diff --git a/Ifish.xcodeproj/project.pbxproj b/Ifish.xcodeproj/project.pbxproj index 3cbac31..7ee059f 100644 --- a/Ifish.xcodeproj/project.pbxproj +++ b/Ifish.xcodeproj/project.pbxproj @@ -15697,8 +15697,8 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 4; - DEVELOPMENT_TEAM = ""; + CURRENT_PROJECT_VERSION = 7; + DEVELOPMENT_TEAM = WFX8GD5HFX; ENABLE_BITCODE = NO; ENABLE_TESTABILITY = YES; FRAMEWORK_SEARCH_PATHS = ( @@ -15812,11 +15812,11 @@ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "compiler-default"; CODE_SIGN_ENTITLEMENTS = Ifish/Ifish.entitlements; - CODE_SIGN_IDENTITY = "iPhone Developer"; + CODE_SIGN_IDENTITY = "iPhone Distribution"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; - CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 4; - DEVELOPMENT_TEAM = ""; + CODE_SIGN_STYLE = Manual; + CURRENT_PROJECT_VERSION = 7; + DEVELOPMENT_TEAM = WFX8GD5HFX; ENABLE_BITCODE = NO; ENABLE_TESTABILITY = YES; FRAMEWORK_SEARCH_PATHS = ( @@ -15901,7 +15901,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.shyuying.Ifish8; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE = ""; - PROVISIONING_PROFILE_SPECIFIER = ""; + PROVISIONING_PROFILE_SPECIFIER = fishdis11; TARGETED_DEVICE_FAMILY = 1; USER_HEADER_SEARCH_PATHS = ""; VERSIONING_SYSTEM = "apple-generic"; diff --git a/Ifish/Info.plist b/Ifish/Info.plist index bfaf236..13206fc 100644 --- a/Ifish/Info.plist +++ b/Ifish/Info.plist @@ -70,7 +70,7 @@ CFBundleVersion - 4 + $(CURRENT_PROJECT_VERSION) ITSAppUsesNonExemptEncryption LSApplicationCategoryType @@ -405,6 +405,8 @@ UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight + UIUserInterfaceStyle + Light UIViewControllerBasedStatusBarAppearance diff --git a/Ifish/Utinitys/IfishHttpRequest/AFNOHeaderHttpTool.h b/Ifish/Utinitys/IfishHttpRequest/AFNOHeaderHttpTool.h index f62488c..48c7b6d 100644 --- a/Ifish/Utinitys/IfishHttpRequest/AFNOHeaderHttpTool.h +++ b/Ifish/Utinitys/IfishHttpRequest/AFNOHeaderHttpTool.h @@ -117,7 +117,7 @@ methodType url : (NSString *)url +(void)deviceBindCameraWith:(NSString *)cameraId userId:(NSNumber *)userId - deviceId:(NSString *)deviceId + deviceId:(DeviceModel *)device success:(void (^)(id response))success failure:(void (^)(NSError* err))failure; diff --git a/Ifish/Utinitys/IfishHttpRequest/AFNOHeaderHttpTool.m b/Ifish/Utinitys/IfishHttpRequest/AFNOHeaderHttpTool.m index cb77c04..c721128 100644 --- a/Ifish/Utinitys/IfishHttpRequest/AFNOHeaderHttpTool.m +++ b/Ifish/Utinitys/IfishHttpRequest/AFNOHeaderHttpTool.m @@ -9,6 +9,7 @@ #import "AFNOHeaderHttpTool.h" #import "AFNetworking.h" #import "SVProgressHUD.h" +#import "IfishDeviceInfo.h" #define ContentType @"text/html" @implementation AFNOHeaderHttpTool - (instancetype)init @@ -258,15 +259,20 @@ methodType url : (NSString *)url +(void)deviceBindCameraWith:(NSString *)cameraId userId:(NSNumber *)userId - deviceId:(NSString *)deviceId + deviceId:(DeviceModel *)device success:(void (^)(id response))success failure:(void (^)(NSError* err))failure { NSDictionary*para=@{ @"cameraId":cameraId, - @"deviceId":deviceId, + @"deviceId":device.deviceId, @"userId": userId }; + NSMutableDictionary*paradic=[[NSMutableDictionary alloc]initWithDictionary:para]; + if ([device.type isEqualToString:DECICE_TYPE_XUANDUO3F]) + { + paradic[@"type"]=@"1"; + } [AFNOHeaderHttpTool requestWihtMethod:RequestTypePost url:IfishdeviceBindCamera params:para success:success failure:failure]; } diff --git a/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/Xuanduo2DataUtility.m b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/Xuanduo2DataUtility.m index 8e6ef4c..076d384 100644 --- a/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/Xuanduo2DataUtility.m +++ b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/Xuanduo2DataUtility.m @@ -128,6 +128,17 @@ // 杀菌 Xuanduo3fModel*backModel=model; NSString *stateString1 = [backModel.uvLamp substringWithRange:NSMakeRange(2, 2)]; + UInt64 mac1=[dataContorl hexToTen:backModel.vuPHstatus]; + + //float TPlabel=mac/10+(mac%10)*0.1; + NSString *lasttime = [NSString stringWithFormat:@"%lld",mac1]; + UIImage*uvNomal=[UIImage imageNamed:@"杀菌关"]; + uvNomal=[uvNomal imageWaterMarkWithString:lasttime rect:CGRectMake(140, 60, 60, 60) attribute:@{NSForegroundColorAttributeName:[UIColor redColor],NSFontAttributeName:[UIFont systemFontOfSize:25]}]; + [light1Btn setImage:uvNomal forState:UIControlStateNormal]; + + UIImage*uvsel=[UIImage imageNamed:@"杀菌开"]; + uvsel=[uvsel imageWaterMarkWithString:lasttime rect:CGRectMake(140, 60, 60, 60) attribute:@{NSForegroundColorAttributeName:[UIColor redColor],NSFontAttributeName:[UIFont systemFontOfSize:25]}]; + [light1Btn setImage:uvsel forState:UIControlStateSelected]; if ([stateString1 isEqualToString:@"01"]) { light1Btn.selected = YES; }else{ @@ -148,7 +159,19 @@ waterLightBtn.selected = NO; } // 恒温 - + UInt64 mac=[dataContorl hexToTen:backModel.heatingTemperature]; + + //float TPlabel=mac/10+(mac%10)*0.1; + float temp = mac/10.0; + NSString *stringTemp = [NSString stringWithFormat:@"%.1f℃",temp]; + UIImage*imageTempNomal=[UIImage imageNamed:@"恒温关"]; + imageTempNomal=[imageTempNomal imageWaterMarkWithString:stringTemp rect:CGRectMake(130, 60, 80, 80) attribute:@{NSForegroundColorAttributeName:[UIColor redColor],NSFontAttributeName:[UIFont systemFontOfSize:25]}]; + [light2Btn setImage:imageTempNomal forState:UIControlStateNormal]; + + UIImage*imageTempsel=[UIImage imageNamed:@"恒温开"]; + imageTempsel=[imageTempsel imageWaterMarkWithString:stringTemp rect:CGRectMake(130, 60, 80, 80) attribute:@{NSForegroundColorAttributeName:[UIColor redColor],NSFontAttributeName:[UIFont systemFontOfSize:25]}]; + [light2Btn setImage:imageTempsel forState:UIControlStateSelected]; + NSString *stateString4 = [backModel.constTmep substringWithRange:NSMakeRange(2, 2)]; if ([stateString4 isEqualToString:@"01"]) { light2Btn.selected = YES; @@ -156,18 +179,6 @@ light2Btn.selected = NO; } - UInt64 mac=[dataContorl hexToTen:backModel.heatingTemperature]; - - //float TPlabel=mac/10+(mac%10)*0.1; - float temp = mac/10.0; - NSString *stringTemp = [NSString stringWithFormat:@"%.1f℃",temp]; - UIImage*imageTempNomal=[UIImage imageNamed:@"恒温关"]; - imageTempNomal=[imageTempNomal imageWaterMarkWithString:stringTemp rect:CGRectMake(130, 60, 60, 60) attribute:@{NSForegroundColorAttributeName:[UIColor redColor],NSFontAttributeName:[UIFont systemFontOfSize:30]}]; - [light2Btn setImage:imageTempNomal forState:UIControlStateNormal]; - - UIImage*imageTempsel=[UIImage imageNamed:@"恒温开"]; - imageTempsel=[imageTempNomal imageWaterMarkWithString:stringTemp rect:CGRectMake(130, 60, 60, 60) attribute:@{NSForegroundColorAttributeName:[UIColor redColor],NSFontAttributeName:[UIFont systemFontOfSize:30]}]; - [light2Btn setImage:imageTempsel forState:UIControlStateSelected]; diff --git a/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/Xuanduo2SettingController.m b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/Xuanduo2SettingController.m index cb7764b..1082dbe 100644 --- a/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/Xuanduo2SettingController.m +++ b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/Xuanduo2SettingController.m @@ -1273,7 +1273,7 @@ static NSString *setTimerflag = @"SetTimerCell"; baseModel*tempModel=[[baseModel alloc]init]; tempModel.sendmacId =self.currentdevice.macAddress; tempModel.resavemacId =self.currentdevice.macAddress; - tempModel.functionCode=@"14"; + tempModel.functionCode=@"0e"; tempModel.massagelegth=@"13"; diff --git a/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/Xuanduo2fController.m b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/Xuanduo2fController.m index d07293c..114b7ac 100644 --- a/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/Xuanduo2fController.m +++ b/Ifish/controllers/FishTinkController/maincontroller/CenterontrolControllers/XuTo/Xuanduo2fController.m @@ -276,18 +276,18 @@ [Xuanduo2DataUtility readCycleSocketDataWithBackMsgModel:_cycleModel addWithBackStr:string1 type:self.currentDevice.type]; if (_cycleModel.lastTime.length) { - UInt64 mac1=[dataContorl hexToTen:_cycleModel.lastTime]; - - //float TPlabel=mac/10+(mac%10)*0.1; - float temp1 = mac1; - NSString *stringTemp = [NSString stringWithFormat:@"%f℃",temp1]; - UIImage*uvNomal=[UIImage imageNamed:@"杀菌关"]; - uvNomal=[uvNomal imageWaterMarkWithString:stringTemp rect:CGRectMake(140, 60, 60, 60) attribute:@{NSForegroundColorAttributeName:[UIColor redColor],NSFontAttributeName:[UIFont systemFontOfSize:30]}]; - [self.light1 setImage:uvNomal forState:UIControlStateNormal]; - - UIImage*uvsel=[UIImage imageNamed:@"杀菌开"]; - uvsel=[uvsel imageWaterMarkWithString:stringTemp rect:CGRectMake(140, 60, 60, 60) attribute:@{NSForegroundColorAttributeName:[UIColor redColor],NSFontAttributeName:[UIFont systemFontOfSize:30]}]; - [self.light1 setImage:uvsel forState:UIControlStateSelected]; +// UInt64 mac1=[dataContorl hexToTen:_cycleModel.lastTime]; +// +// //float TPlabel=mac/10+(mac%10)*0.1; +// float temp1 = mac1; +// NSString *stringTemp = [NSString stringWithFormat:@"%f℃",temp1]; +// UIImage*uvNomal=[UIImage imageNamed:@"杀菌关"]; +// uvNomal=[uvNomal imageWaterMarkWithString:stringTemp rect:CGRectMake(140, 60, 60, 60) attribute:@{NSForegroundColorAttributeName:[UIColor redColor],NSFontAttributeName:[UIFont systemFontOfSize:30]}]; +// [self.light1 setImage:uvNomal forState:UIControlStateNormal]; +// +// UIImage*uvsel=[UIImage imageNamed:@"杀菌开"]; +// uvsel=[uvsel imageWaterMarkWithString:stringTemp rect:CGRectMake(140, 60, 60, 60) attribute:@{NSForegroundColorAttributeName:[UIColor redColor],NSFontAttributeName:[UIFont systemFontOfSize:30]}]; +// [self.light1 setImage:uvsel forState:UIControlStateSelected]; } } else @@ -875,8 +875,15 @@ [para setValue:priId forKey:@"priId.deviceId"]; [para setValue:userId forKey:@"priId.userId"]; + NSString*string=[NSString stringWithFormat:@"%@/api/user/deleteDeviceUser.do",JIEKOUPORT]; + if ([self.currentDevice.type isEqualToString:DECICE_TYPE_XUANDUO3F]) { + string=[NSString stringWithFormat:@"%@/api/user/deletePetDeviceUser.do",JIEKOUPORT]; + [para removeAllObjects]; + para[@"userId"]=userId; + para[@"deviceId"]=priId; + } // __weak typeof (self)weakSelf=self; - [mannager POST:kDeleteDeviceUser parameters:para success:^(AFHTTPRequestOperation *operation, id responseObject) { + [mannager POST:string parameters:para success:^(AFHTTPRequestOperation *operation, id responseObject) { if (responseObject) { NSDictionary*resultDic=[NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableContainers error:nil]; NSLog(@"result:%@",resultDic[@"result"]); diff --git a/Ifish/controllers/IfishTabControllers/设备/IfishDeviceViewController.m b/Ifish/controllers/IfishTabControllers/设备/IfishDeviceViewController.m index 2a45f58..f7f07f3 100644 --- a/Ifish/controllers/IfishTabControllers/设备/IfishDeviceViewController.m +++ b/Ifish/controllers/IfishTabControllers/设备/IfishDeviceViewController.m @@ -386,10 +386,15 @@ Assign BOOL isPush; for (NSDictionary*deviceDic in deviceArray) { DeviceModel*devicemodel=[[DeviceModel alloc] initWithDict:deviceDic]; - if (devicemodel.storeName.length)//宠物笼 + + if ([devicemodel.type isEqualToString:DECICE_TYPE_XUANDUO3F])//宠物笼 { + NSString*storeName=devicemodel.storeName; + if ([storeName isKindOfClass:[NSNull class]]||([storeName isKindOfClass: [NSString class]]&&storeName.length==0)) { + storeName=@"宠物店"; + } NSMutableArray*array=petStores[storeName]; if (!array) { array=[NSMutableArray array]; @@ -851,7 +856,7 @@ Assign BOOL isPush; for (DeviceModel *device in deivceArr) { - if (!device.storeName.length) + if (![device.type isEqualToString:DECICE_TYPE_XUANDUO3F]) { FormatTankAddCamera *deviceListModel =[[FormatTankAddCamera alloc] init]; deviceListModel.device = device; diff --git a/Ifish/controllers/IfishYooseeFile/IfishYooseeControlller/yooseFishTankView/MonitorBootmView.m b/Ifish/controllers/IfishYooseeFile/IfishYooseeControlller/yooseFishTankView/MonitorBootmView.m index 626d65f..03d34c2 100644 --- a/Ifish/controllers/IfishYooseeFile/IfishYooseeControlller/yooseFishTankView/MonitorBootmView.m +++ b/Ifish/controllers/IfishYooseeFile/IfishYooseeControlller/yooseFishTankView/MonitorBootmView.m @@ -392,15 +392,15 @@ self.device = arr[index]; - [self bidDeviceAddCamerawithdeviceId:self.device.deviceId]; + [self bidDeviceAddCamerawithdeviceId:self.device]; } --(void)bidDeviceAddCamerawithdeviceId:(NSString *)deviceId{ +-(void)bidDeviceAddCamerawithdeviceId:(DeviceModel *)device{ NSString *usId =[dataContorl dataControlGetUserIdInfo]; NSNumber *userId =(NSNumber *)usId ; - [AFNOHeaderHttpTool deviceBindCameraWith:self.cameraId userId:userId deviceId:deviceId success:^(id response) { + [AFNOHeaderHttpTool deviceBindCameraWith:self.cameraId userId:userId deviceId:device.deviceId success:^(id response) { NSDictionary *reDic=[NSJSONSerialization JSONObjectWithData:response options:NSJSONReadingMutableContainers error:nil]; @@ -416,7 +416,7 @@ NSArray *devicCameraArr = [[DataCenter defaultDtacenter] valueForKey:@"devicamerArr"]; DeviceCameraModel *devicecamera=[[DeviceCameraModel alloc] init]; devicecamera.cameraId = self.cameraId; - devicecamera.deviceId = deviceId; + devicecamera.deviceId = device.deviceId; NSMutableArray *camerwIdArr = [[NSMutableArray alloc] initWithArray:devicCameraArr]; @@ -445,7 +445,7 @@ for (DeviceModel *model in deviceArry) { - if ([model.deviceId isEqual:deviceId]) { + if ([model.deviceId isEqual:device.deviceId]) { [newArr removeObject:model]; diff --git a/Ifish/controllers/erweima/CreatErWeiMaController.h b/Ifish/controllers/erweima/CreatErWeiMaController.h index d2dc87c..7868c5a 100644 --- a/Ifish/controllers/erweima/CreatErWeiMaController.h +++ b/Ifish/controllers/erweima/CreatErWeiMaController.h @@ -15,6 +15,7 @@ @property (nonatomic,strong) DeviceModel *erdevicemodel; @property (nonatomic, strong) NSString *deviceid; +@property (weak, nonatomic) IBOutlet UILabel *tips; @end diff --git a/Ifish/controllers/erweima/CreatErWeiMaController.m b/Ifish/controllers/erweima/CreatErWeiMaController.m index 2788300..10e3ee4 100644 --- a/Ifish/controllers/erweima/CreatErWeiMaController.m +++ b/Ifish/controllers/erweima/CreatErWeiMaController.m @@ -10,6 +10,7 @@ #import "QRCodeGenerator.h" #import "DeviceModel.h" #import "UINavigationBar+Background.h" +#import "IfishDeviceInfo.h" @interface CreatErWeiMaController () @property(nonatomic,strong)NSArray*arry; @end @@ -42,8 +43,25 @@ // } //DeviceModel*model=[_arry objectAtIndex:0];//分享选中设备 + if ([self.erdevicemodel.deviceId isKindOfClass:[NSNumber class]]) { + self.erdevicemodel.deviceId=[NSString stringWithFormat:@"%ld",self.erdevicemodel.deviceId.integerValue]; + } NSString*str=[NSString stringWithFormat:@"deviceId=%@",self.erdevicemodel.deviceId.length?self.erdevicemodel.deviceId:[CommonUtils getNotNilStr:self.deviceid]]; self.erWeiMaView.image=[QRCodeGenerator qrImageForString:str imageSize:self.erWeiMaView.bounds.size.width]; + if ([self.erdevicemodel.type isEqualToString:DECICE_TYPE_XUANDUO3F]) + { + self.tips.text=@"点击扫一扫,和我一起控制我的宠物笼吧!"; + } + else if (self.deviceid) + { + self.tips.text=@"点击扫一扫,和我一起控制我的摄像头吧!"; + } + else if (self.deviceid) + { + self.tips.text=@"点击扫一扫,和我一起控制我的水族箱吧!"; + } + + } - (void)didReceiveMemoryWarning { diff --git a/Ifish/controllers/erweima/CreatErWeiMaController.xib b/Ifish/controllers/erweima/CreatErWeiMaController.xib index ba1e335..cc65b98 100644 --- a/Ifish/controllers/erweima/CreatErWeiMaController.xib +++ b/Ifish/controllers/erweima/CreatErWeiMaController.xib @@ -1,48 +1,51 @@ - - + + + - + + + - + - - + + - - + + + + + - + - - + + - + - - - diff --git a/Ifish/controllers/erweima/ScanViewController.m b/Ifish/controllers/erweima/ScanViewController.m index 903043f..d77dd25 100644 --- a/Ifish/controllers/erweima/ScanViewController.m +++ b/Ifish/controllers/erweima/ScanViewController.m @@ -297,7 +297,13 @@ -(void)shareDeviceWithUserId:(NSNumber*)userId addDeviceId:(NSString*)deviceId{ NSString *userID =[NSString stringWithFormat:@"%@",userId]; - [AFHttpTool shareDeviceWhth:userID deviceId:deviceId success:^(id response) { + + + NSString *url = [NSString stringWithFormat:@"%@%@",kshareDeviceByQrCode,userID]; + NSDictionary*para=@{ + @"deviceId":deviceId + }; + [AFHttpTool requestWihtMethod:RequestMethodTypePost url:url params:para success:^(id response) { NSDictionary*resultDic=[NSJSONSerialization JSONObjectWithData:response options:NSJSONReadingMutableContainers error:nil]; NSLog(@"result:%@",resultDic[@"result"]); @@ -317,6 +323,8 @@ }]; + + } - (void)reStartScan {