宠物店修改
This commit is contained in:
+1
-1
@@ -25,7 +25,7 @@
|
||||
// CFShow((__bridge CFTypeRef)(infoDic));
|
||||
NSString *app_Version=[infoDic objectForKey:@"CFBundleShortVersionString"];
|
||||
NSLog(@"app_Version%@",app_Version);
|
||||
app_Version=@"4.7.4";
|
||||
app_Version=@"4.7.5";
|
||||
NSString *versionStr = [NSString stringWithFormat:@"v%@",app_Version];
|
||||
NSString *buildVersion = [infoDic objectForKey:@"CFBundleVersion"];
|
||||
if (buildVersion.length > 0) {
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
@property (nonatomic,copy) NSString *imgeaName;
|
||||
@property (nonatomic,copy) NSString *deviceName;
|
||||
@property (nonatomic,strong) DeviceModel *device;
|
||||
@property (nonatomic,strong) NSMutableArray *list;//设备列表
|
||||
@property (nonatomic,strong) IfishCameraModel *camera;
|
||||
|
||||
@end
|
||||
|
||||
+3
@@ -26,6 +26,9 @@
|
||||
self.deviceImg.image = [UIImage imageNamed:@"加热系统"];
|
||||
}
|
||||
else if (indexPath.row ==3){
|
||||
self.deviceImg.image = [UIImage imageNamed:@"智能宠物系统"];
|
||||
}
|
||||
else if (indexPath.row ==4){
|
||||
self.deviceImg.image = [UIImage imageNamed:@"敬请期待"];
|
||||
}
|
||||
|
||||
|
||||
+31
-12
@@ -86,7 +86,7 @@ extern BOOL isfromCameraView;
|
||||
|
||||
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
|
||||
|
||||
return 4;
|
||||
return 5;
|
||||
}
|
||||
|
||||
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
@@ -102,7 +102,7 @@ extern BOOL isfromCameraView;
|
||||
}
|
||||
|
||||
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
return 378/2.0;
|
||||
return 278/2.0;
|
||||
}
|
||||
|
||||
- (void)didReceiveMemoryWarning {
|
||||
@@ -126,10 +126,10 @@ extern BOOL isfromCameraView;
|
||||
{
|
||||
//摄像头
|
||||
NSArray * cameraArr =[[DataCenter defaultDtacenter]valueForKey:@"cameraArr"];
|
||||
if ([cameraArr count]>=5) {
|
||||
[self.view makeToast:@"设备已达上限"];
|
||||
return;
|
||||
}
|
||||
// if ([cameraArr count]>=5) {
|
||||
// [self.view makeToast:@"设备已达上限"];
|
||||
// return;
|
||||
// }
|
||||
if ( [GWP2PClient sharedClient].linkStatus==P2PLinkStatusOK) {
|
||||
|
||||
|
||||
@@ -156,12 +156,12 @@ extern BOOL isfromCameraView;
|
||||
//水族箱
|
||||
NSArray * deviceArr =[[DataCenter defaultDtacenter]valueForKey:@"deviceInfo"];
|
||||
|
||||
if ([deviceArr count]>=5) {
|
||||
|
||||
[self.view makeToast:@"设备已达上限"];
|
||||
return;
|
||||
|
||||
}
|
||||
// if ([deviceArr count]>=5) {
|
||||
//
|
||||
// [self.view makeToast:@"设备已达上限"];
|
||||
// return;
|
||||
//
|
||||
// }
|
||||
self.hidesBottomBarWhenPushed = YES;
|
||||
ConAquarMethodVC *methodVC = InitObject(ConAquarMethodVC);
|
||||
methodVC.deviceType=DEVICEAQUARIUM;
|
||||
@@ -190,6 +190,25 @@ extern BOOL isfromCameraView;
|
||||
//[self.view makeToast:@"敬请期待"]; 加热棒
|
||||
|
||||
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
{
|
||||
|
||||
self.hidesBottomBarWhenPushed = YES;
|
||||
ConAquarMethodVC *methodVC = InitObject(ConAquarMethodVC);
|
||||
methodVC.deviceType=DEVICEPETS;
|
||||
methodVC.titleString=@"连接宠物笼";
|
||||
|
||||
[self.navigationController pushViewController:methodVC animated:YES];
|
||||
|
||||
// SecondConnectWifiController *wifivc=[[SecondConnectWifiController alloc]init];
|
||||
// wifivc.vcTitle=@"连接加热器";
|
||||
// [self.navigationController pushViewController:wifivc animated:YES];
|
||||
// [wifivc addTitleViewWithTitle:@"连接加热器"];
|
||||
//[self.view makeToast:@"敬请期待"]; 加热棒
|
||||
|
||||
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
@@ -43,6 +43,10 @@
|
||||
#import "PushMessageModel.h"
|
||||
#import "IfishInformationListViewCell.h"//资讯
|
||||
#import "JHRefresh.h"//refresh
|
||||
#import "PetStoresViewController.h"
|
||||
#import "StoreNameView.h"
|
||||
#import "ConnectingAquarVC.h"
|
||||
#import "SecondConnectWifiController.h"
|
||||
@interface IfishDeviceViewController ()<UITableViewDelegate,UITableViewDataSource,LxPopViewDelegate,ShopTtemListDelegate>
|
||||
|
||||
@property(nonatomic,strong)UITableView *tableView;
|
||||
@@ -52,6 +56,7 @@
|
||||
@property(nonatomic,strong) DXPopover *popover;
|
||||
|
||||
@property(nonatomic,strong) NSArray *cameraArr;
|
||||
@property(nonatomic,strong) NSMutableDictionary *petStores;
|
||||
|
||||
@property(nonatomic,strong) UIButton*rightButton;
|
||||
|
||||
@@ -373,18 +378,40 @@ Assign BOOL isPush;
|
||||
//设备信息
|
||||
NSArray*deviceArray=dataDic[@"device"];
|
||||
NSArray*cameraA=dataDic[@"camera"];
|
||||
//宠物店
|
||||
NSMutableDictionary*petStores=[NSMutableDictionary dictionary];
|
||||
NSMutableArray *deviceArr = [[NSMutableArray alloc] init];
|
||||
if ([deviceArray count]!=0) {
|
||||
|
||||
for (NSDictionary*deviceDic in deviceArray) {
|
||||
DeviceModel*devicemodel=[[DeviceModel alloc] initWithDict:deviceDic];
|
||||
|
||||
[deviceArr insertObject:devicemodel atIndex:0];
|
||||
if (devicemodel.storeName.length)//宠物笼
|
||||
|
||||
{
|
||||
NSString*storeName=devicemodel.storeName;
|
||||
NSMutableArray*array=petStores[storeName];
|
||||
if (!array) {
|
||||
array=[NSMutableArray array];
|
||||
|
||||
}
|
||||
[array insertObject:devicemodel atIndex:0];
|
||||
|
||||
petStores[storeName]=array;
|
||||
}
|
||||
else {
|
||||
[deviceArr insertObject:devicemodel atIndex:0];
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
[[DataCenter defaultDtacenter]setValue:deviceArr forKey:@"deviceInfo"];
|
||||
|
||||
|
||||
self.petStores=petStores;
|
||||
[[DataCenter defaultDtacenter]setValue:petStores forKey:@"petStores"];
|
||||
|
||||
//存储摄像头设备信息
|
||||
NSMutableArray *camras = [[NSMutableArray alloc] init];
|
||||
if (cameraA .count !=0) {
|
||||
@@ -805,6 +832,7 @@ Assign BOOL isPush;
|
||||
|
||||
self.deviceArr =[dataContorl getallDevices];
|
||||
self.cameraArr =[dataContorl getallCameras];
|
||||
self.petStores= [[DataCenter defaultDtacenter]valueForKey:@"petStores"];
|
||||
[self getTotalDeviceArrWith:self.deviceArr addCameraArr:self.cameraArr];
|
||||
|
||||
[self.tableView reloadData];
|
||||
@@ -839,6 +867,16 @@ Assign BOOL isPush;
|
||||
[self.totalArr addObject:deviceListModel];
|
||||
|
||||
}
|
||||
for (NSString *store in self.petStores) {
|
||||
FormatTankAddCamera *deviceListModel =[[FormatTankAddCamera alloc] init];
|
||||
deviceListModel.list = self.petStores[store];
|
||||
deviceListModel.type = @"pets";
|
||||
deviceListModel.deviceName = store;
|
||||
deviceListModel.imgeaName = @"petsImage";
|
||||
[self.totalArr addObject:deviceListModel];
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1184,7 +1222,48 @@ Assign BOOL isPush;
|
||||
[[Socketsingleton sharedInstance] cutOffSocket];
|
||||
[[IfishDataUnity shareDataInstance] initAppCenterVcWith:model.device addWithdissMisVc:nil];
|
||||
|
||||
}else if ([model.type isEqualToString:@"camera"]){
|
||||
}
|
||||
else if ([model.type isEqualToString:@"pets"])
|
||||
{
|
||||
// PetStoresViewController*store=[[PetStoresViewController alloc]init];
|
||||
// store.store=model;
|
||||
[[DataCenter defaultDtacenter] setValue:model forKey:@"currentStore"];
|
||||
|
||||
DeviceModel*pushDevice=nil;
|
||||
NSString*macid=[[DataCenter defaultDtacenter].cache stringForKey:@"currentPetDevice"];
|
||||
if (macid.length)
|
||||
{
|
||||
BOOL find=NO;
|
||||
for (DeviceModel*de in model.list) {
|
||||
if ([macid isEqualToString:de.macAddress])
|
||||
{
|
||||
find=YES;
|
||||
pushDevice=de;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (find)
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
pushDevice=model.list.firstObject;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
pushDevice=model.list.firstObject;
|
||||
}
|
||||
|
||||
[[DataCenter defaultDtacenter].cache setString:pushDevice.macAddress forKey:@"currentPetDevice"];
|
||||
[[Socketsingleton sharedInstance] cutOffSocket];
|
||||
[[IfishDataUnity shareDataInstance] initAppCenterVcWith:pushDevice addWithdissMisVc:nil];
|
||||
|
||||
|
||||
}
|
||||
else if ([model.type isEqualToString:@"camera"]){
|
||||
|
||||
// self.hidesBottomBarWhenPushed = YES;
|
||||
// IfishP2PPlayBackListViewController *cameraShopVC=[[IfishP2PPlayBackListViewController alloc]init];
|
||||
@@ -1547,7 +1626,7 @@ Assign BOOL isPush;
|
||||
}
|
||||
|
||||
NSIndexSet *asset = [NSIndexSet indexSetWithIndex:2];
|
||||
[weskSelf.tableView reloadSections:asset withRowAnimation:UITableViewRowAnimationNone];
|
||||
[weskSelf.tableView reloadSections:asset withRowAnimation:UITableViewRowAnimationAutomatic];
|
||||
}
|
||||
|
||||
[weskSelf.progressHud hide:YES];
|
||||
|
||||
+16
-12
@@ -1,12 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11762" systemVersion="15G31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14460.31" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
|
||||
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14460.20"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
@@ -20,14 +19,14 @@
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="THd-Bu-zD5">
|
||||
<rect key="frame" x="17" y="10" width="89" height="75"/>
|
||||
<rect key="frame" x="25" y="10" width="89" height="75"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="89" id="0Pc-4E-ufb"/>
|
||||
<constraint firstAttribute="height" constant="75" id="KcI-Vb-QWI"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="内容摘要" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="j2f-hz-gt7">
|
||||
<rect key="frame" x="114" y="33" width="198" height="15"/>
|
||||
<rect key="frame" x="122" y="33" width="182" height="15"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="15" id="Mem-ah-ew5"/>
|
||||
</constraints>
|
||||
@@ -36,7 +35,7 @@
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="标题栏" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="JgQ-HP-X5l">
|
||||
<rect key="frame" x="114" y="10" width="198" height="21"/>
|
||||
<rect key="frame" x="122" y="10" width="182" height="21"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="21" id="BEA-GV-KLN"/>
|
||||
</constraints>
|
||||
@@ -45,21 +44,21 @@
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="21M-GY-1ue">
|
||||
<rect key="frame" x="0.0" y="94" width="320" height="1"/>
|
||||
<rect key="frame" x="0.0" y="93.5" width="320" height="1"/>
|
||||
<color key="backgroundColor" red="0.83529411764705885" green="0.83529411764705885" blue="0.83529411764705885" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="1" id="Swk-c6-aZl"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="informationlist_view.png" translatesAutoresizingMaskIntoConstraints="NO" id="4WM-Lf-mP1">
|
||||
<rect key="frame" x="208" y="69" width="20" height="12"/>
|
||||
<rect key="frame" x="200" y="66.5" width="20" height="12"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="12" id="5Q6-5Z-GhG"/>
|
||||
<constraint firstAttribute="width" constant="20" id="kt8-Rt-4lN"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="1000" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8BV-KU-YQ2">
|
||||
<rect key="frame" x="234.5" y="64" width="28.5" height="20"/>
|
||||
<rect key="frame" x="226.5" y="61.5" width="28.5" height="20"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="20" id="CWc-Pp-MZi"/>
|
||||
</constraints>
|
||||
@@ -68,7 +67,7 @@
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="10" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="tos-bK-aju">
|
||||
<rect key="frame" x="298.5" y="65" width="13.5" height="20"/>
|
||||
<rect key="frame" x="290.5" y="62.5" width="13.5" height="20"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="20" id="aPb-az-2hG"/>
|
||||
</constraints>
|
||||
@@ -77,7 +76,7 @@
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="informationlist_comment.png" translatesAutoresizingMaskIntoConstraints="NO" id="akZ-xg-M7C">
|
||||
<rect key="frame" x="278" y="69" width="16" height="13"/>
|
||||
<rect key="frame" x="270" y="66.5" width="16" height="13"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="13" id="jI9-LF-fAx"/>
|
||||
<constraint firstAttribute="width" constant="16" id="jlO-wX-UXc"/>
|
||||
@@ -105,6 +104,11 @@
|
||||
<constraint firstItem="j2f-hz-gt7" firstAttribute="top" secondItem="JgQ-HP-X5l" secondAttribute="bottom" constant="2" id="fgL-3A-GSX"/>
|
||||
<constraint firstAttribute="trailingMargin" secondItem="JgQ-HP-X5l" secondAttribute="trailing" id="vgK-9J-52g"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="color" keyPath="borderColor">
|
||||
<color key="value" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</tableViewCellContentView>
|
||||
<connections>
|
||||
<outlet property="detailLabe" destination="j2f-hz-gt7" id="Qgk-YF-MRi"/>
|
||||
|
||||
Reference in New Issue
Block a user