diff --git a/Ifish/Assets.xcassets/.DS_Store b/Ifish/Assets.xcassets/.DS_Store index 507938a..483ed93 100644 Binary files a/Ifish/Assets.xcassets/.DS_Store and b/Ifish/Assets.xcassets/.DS_Store differ diff --git a/Ifish/Assets.xcassets/history_bg_new.imageset/Contents.json b/Ifish/Assets.xcassets/history_bg_new.imageset/Contents.json new file mode 100644 index 0000000..b1dc7ba --- /dev/null +++ b/Ifish/Assets.xcassets/history_bg_new.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "history_bg_new@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Ifish/Assets.xcassets/history_bg_new.imageset/history_bg_new@3x.png b/Ifish/Assets.xcassets/history_bg_new.imageset/history_bg_new@3x.png new file mode 100644 index 0000000..eb19a6e Binary files /dev/null and b/Ifish/Assets.xcassets/history_bg_new.imageset/history_bg_new@3x.png differ diff --git a/Ifish/Info.plist b/Ifish/Info.plist index 2c93a48..8e20b64 100644 --- a/Ifish/Info.plist +++ b/Ifish/Info.plist @@ -70,7 +70,7 @@ CFBundleVersion - 10.0.5 + 10.0.8 ITSAppUsesNonExemptEncryption LSApplicationCategoryType diff --git a/Ifish/controllers/HotBar/Views/IfishChatView.h b/Ifish/controllers/HotBar/Views/IfishChatView.h index 39ee179..f03d473 100644 --- a/Ifish/controllers/HotBar/Views/IfishChatView.h +++ b/Ifish/controllers/HotBar/Views/IfishChatView.h @@ -11,4 +11,5 @@ @interface IfishChatView : UIView @property(nonatomic,strong)NSArray*datas; -(void)reloadHeater;//刷新流量状态 +-(void)loadDatasWithArray:(NSArray *)dataArray; @end diff --git a/Ifish/controllers/HotBar/Views/IfishChatView.m b/Ifish/controllers/HotBar/Views/IfishChatView.m index 315eb3d..d1d0999 100644 --- a/Ifish/controllers/HotBar/Views/IfishChatView.m +++ b/Ifish/controllers/HotBar/Views/IfishChatView.m @@ -10,11 +10,12 @@ #import "IfishHistroyVo.h" #define Normal_heaterPh 499 //只有499才是正常流量 -#define Rect_Width kSizeFrom750(568) -#define Origin_Left kSizeFrom750(72) -#define Rect_Height kSizeFrom750(185) +#define Rect_Width kSizeFrom750(599) +#define Origin_Left kSizeFrom750(59) +#define Rect_Height kSizeFrom750(420) +#define Zero_Y kSizeFrom750(526) @interface IfishChatView() -@property(nonatomic,strong)NSMutableArray*line1; +@property(nonatomic,strong)NSMutableArray*line1;//水温 @property(nonatomic,strong)UIView *lablesView; @property(nonatomic,strong)UILabel*numLable; Strong NSMutableArray * heaterPhArray;//流量走势 @@ -39,73 +40,76 @@ Strong NSMutableArray * heaterPhArray;//流量走势 [_line1 removeAllObjects]; if (_datas.count) { - -// CGFloat gapW= 357*scale*0.1; for (int i=0; i350){ vo.heaterWaterTemperature=@"350"; }else if(vo.heaterWaterTemperature.integerValue<250){ continue; } - CGFloat y=Rect_Height*(1-((vo.heaterWaterTemperature.integerValue*0.1-25)/10))+kSizeFrom750(43);//*-1*+158; + CGFloat y=Rect_Height*(1-((vo.heaterWaterTemperature.integerValue*0.1-25)/10))+kSizeFrom750(105);// CGPoint p1=CGPointMake(x, y); -// NSLog(@"%f-------%f--%f-",y,vo.heaterWaterTemperature.integerValue*0.1,x); [_line1 addObject:NSStringFromCGPoint(p1)]; } } return _line1; } --(void)setDatas:(NSArray *)datas{ +-(void)loadDatasWithArray:(NSArray *)dataArray{ NSSortDescriptor *ageSD = [NSSortDescriptor sortDescriptorWithKey:@"heaterGatheringTime_int" ascending:YES]; - datas = [datas sortedArrayUsingDescriptors:@[ageSD]]; - _datas=datas; + dataArray = [dataArray sortedArrayUsingDescriptors:@[ageSD]]; + _datas=dataArray; [self layoutIfNeeded]; } --(NSMutableArray *)heaterPhArray{ - if (!_heaterPhArray) { - _heaterPhArray = InitObject(NSMutableArray); - //添加流量 - for (int i=0; i<23; i++) { - CGFloat x=(i*(Rect_Width/24)+Origin_Left); - CGFloat y=kSizeFrom750(236); - UIView *lineView = [[UIView alloc] initWithFrame:RECT(x, y, Rect_Width/24, 1)]; - lineView.tag = i+100; - [self addSubview:lineView]; - [_heaterPhArray addObject:lineView]; - } - } - return _heaterPhArray; -} -//刷新流量状态 --(void)reloadHeater{ - for (UIView *view in self.heaterPhArray) { - [view.layer removeAllAnimations]; - } - - for (int i=0; i1) { - for (int i=[vo.heaterGatheringTime intValue]; i<[nextVo.heaterGatheringTime intValue]; i++) { - UIView *emptyView = [self viewWithTag:i+100]; - [self drawDashLine:emptyView lineLength:2 lineSpacing:1 lineColor:[UIColor redColor]]; - } - }else{ - UIView *lineView = [self viewWithTag:[vo.heaterGatheringTime integerValue]+100]; - if([vo.heaterPh integerValue]==Normal_heaterPh&&[nextVo.heaterPh integerValue]==Normal_heaterPh){//正常流量 - lineView.layer.backgroundColor = [UIColor greenColor].CGColor; - - }else{ - [self drawDashLine:lineView lineLength:2 lineSpacing:1 lineColor:[UIColor redColor]]; - } - } - } -} +//-(NSMutableArray *)heaterPhArray{ +// if (!_heaterPhArray) { +// _heaterPhArray = InitObject(NSMutableArray); +// //添加流量 +// for (int i=0; i<23; i++) { +// CGFloat x=(i*(Rect_Width/24)+Origin_Left); +// CGFloat y=kSizeFrom750(315); +// UIView *lineView = [[UIView alloc] initWithFrame:RECT(x, y, Rect_Width/24.f, 1)]; +// lineView.tag = i+100; +// [self addSubview:lineView]; +// [_heaterPhArray addObject:lineView]; +// } +// } +// return _heaterPhArray; +//} +////刷新流量状态 +//-(void)reloadHeater{ +// for (UIView *view in self.heaterPhArray) { +// [view.layer removeAllAnimations]; +// } +// +// for (int i=0; i1) { +// for (int i=[vo.heaterGatheringTime intValue]; i<[nextVo.heaterGatheringTime intValue]; i++) { +// UIView *emptyView = [self viewWithTag:i+100]; +// [self drawDashLine:emptyView lineLength:2 lineSpacing:1 lineColor:[UIColor redColor]]; +// } +// }else{ +// UIView *lineView = [self viewWithTag:[vo.heaterGatheringTime integerValue]+100]; +// if([vo.heaterPh integerValue]==Normal_heaterPh&&[nextVo.heaterPh integerValue]==Normal_heaterPh){//正常流量 +// lineView.layer.backgroundColor = [UIColor greenColor].CGColor; +// +// }else{ +// [self drawDashLine:lineView lineLength:2 lineSpacing:1 lineColor:[UIColor redColor]]; +// } +// } +// } +//} -(void)drawLine{ + + + if (self.datas==nil) { + return; + } + //1、水温线 UIColor *color = [UIColor redColor]; [color set]; //设置线条颜色 @@ -124,9 +128,88 @@ Strong NSMutableArray * heaterPhArray;//流量走势 [path addLineToPoint:CGPointFromString(p)]; } - // [path closePath];//第五条线通过调用closePath方法得到的 + [path stroke];//Draws line 根据坐标点连线 + + //每个圆点大小 + for (int i=0; i1) { + for (int j=hour1+1; j1) { + for (int j=hour1+1; j @property (nonatomic,strong) UITableView *tableView; -Assign BOOL isConnectP2P; @end extern BOOL isfromCameraView; @implementation IfishBindDeviceSelectViewController @@ -27,7 +26,6 @@ extern BOOL isfromCameraView; - (void)viewDidLoad { [super viewDidLoad]; isfromCameraView = NO; - _isConnectP2P = NO; // Do any additional setup after loading the view. [self addTitleViewWithTitle:@"选择设备"]; [self creatTab]; @@ -51,35 +49,19 @@ extern BOOL isfromCameraView; NSString *userIDName=[NSString stringWithFormat:@"%d",(int)[model.gwellUserID integerValue]&0x7fffffff]; NSLog(@"%@%@%@",userIDName,model.P2PVerifyCode1,model.P2PVerifyCode2); - if ([userIDName isEqualToString:@"0"]) { - // - [self.view makeToast:@"摄像头用户名空错误码10001"]; - return; - } +// dispatch_queue_t queue = dispatch_queue_create("net.bujige.testQueue", DISPATCH_QUEUE_CONCURRENT); - if ([model.P2PVerifyCode1 isEqualToString:@""]) { - [self.view makeToast:@"摄像头P2PVerifyCode1空错误码10002"]; - return; - } - if ([model.P2PVerifyCode2 isEqualToString:@""]) { - [self.view makeToast:@"摄像头P2PVerifyCode2空错误码10003"]; - return; - } - - dispatch_queue_t queue = dispatch_queue_create("net.bujige.testQueue", DISPATCH_QUEUE_CONCURRENT); - - dispatch_async(queue, ^{ +// dispatch_async(queue, ^{ // // 追加任务1 if ([GWP2PClient sharedClient].linkStatus!=P2PLinkStatusOK) { [[GWP2PClient sharedClient] connectWithAccount:userIDName codeStr1:model.P2PVerifyCode1 codeStr2:model.P2PVerifyCode2 sessionID1:model.sessionID sessionID2:model.sessionID2 customerIDs:nil]; } - dispatch_async(dispatch_get_main_queue(), ^{ - +// dispatch_async(dispatch_get_main_queue(), ^{ + [SVProgressHUD dismiss]; - }); - - }); +// }); +// }); } diff --git a/Ifish/controllers/IfishYooseeFile/IfishYooseeControlller/YooseConnectFirstViewController.m b/Ifish/controllers/IfishYooseeFile/IfishYooseeControlller/YooseConnectFirstViewController.m index 1105b1b..2658faf 100644 --- a/Ifish/controllers/IfishYooseeFile/IfishYooseeControlller/YooseConnectFirstViewController.m +++ b/Ifish/controllers/IfishYooseeFile/IfishYooseeControlller/YooseConnectFirstViewController.m @@ -49,13 +49,6 @@ } --(void)viewWillAppear:(BOOL)animated{ - - [self connectDevice]; - -} - - -(void)connectDevice{ [[UDPManager sharedDefault] ScanLanDevice]; diff --git a/Ifish/controllers/IfishYooseeFile/IfishYooseeControlller/YooseeNextConnectViewController.mm b/Ifish/controllers/IfishYooseeFile/IfishYooseeControlller/YooseeNextConnectViewController.mm index bfaf489..ad65f35 100644 --- a/Ifish/controllers/IfishYooseeFile/IfishYooseeControlller/YooseeNextConnectViewController.mm +++ b/Ifish/controllers/IfishYooseeFile/IfishYooseeControlller/YooseeNextConnectViewController.mm @@ -65,7 +65,7 @@ typedef NS_ENUM(NSInteger,lodingViewdissMissStyle) { - (void)viewDidLoad { [super viewDidLoad]; //智能联机 - _isDeviceLinkIn = NO; + self.isDeviceLinkIn = NO; self.conectType = conectType_Intelligent; self.addresses = [[NSMutableDictionary alloc] initWithCapacity:1]; self.view.backgroundColor = [UIColor whiteColor]; @@ -461,6 +461,7 @@ typedef NS_ENUM(NSInteger,lodingViewdissMissStyle) { -(void)dealloc{ [[GWP2PDeviceLinker shareInstance] p2pStopSmartLink]; + } #pragma mark - UI正常状态 diff --git a/Ifish/controllers/logAddRegistController/LogInViewController.m b/Ifish/controllers/logAddRegistController/LogInViewController.m index a31a2cf..e14e7da 100644 --- a/Ifish/controllers/logAddRegistController/LogInViewController.m +++ b/Ifish/controllers/logAddRegistController/LogInViewController.m @@ -270,26 +270,23 @@ btn.backgroundColor = RGB(0, 184, 239); if ([result isEqualToString:@"100"]) { - // 登录成功 NSDictionary*DataDic=dict[@"data"]; NSString*phoneNumber=self.loginPhoneNumberTextField.text; NSString*password=self.loginPasswordTextField.text; [[IfishUserDataUnity shareDataInstance] userloginValidationSuccsess:DataDic phoneNumber:phoneNumber passward:password]; - //登陆成功之后,验证当前页面devicetoken是否上送成功,如果还未上送,则重新上送devicetoken - if (![[NSUserDefaults standardUserDefaults] boolForKey:is_Bind_DeviceToken]) { - UserModel *model=[[UserModel alloc] initWithDict:[DataDic objectForKey:@"userInfo"]]; - NSDictionary *params = @{@"deviceId":[FuncUserDefault strForKey:kDeviceToken], + //重新登陆成功之后,上送deviceToken到服务器 + UserModel *model=[[UserModel alloc] initWithDict:[DataDic objectForKey:@"userInfo"]]; + NSDictionary *params = @{@"deviceId":[FuncUserDefault strForKey:kDeviceToken], @"userId":model.userId, @"phoneType":@"iOS" }; - [AFNOHeaderHttpTool requestWihtMethod:RequestTypePost url:Push_BindDevice_Url params:params success:^(id response) { + [AFNOHeaderHttpTool requestWihtMethod:RequestTypePost url:Push_BindDevice_Url params:params success:^(id response) { //绑定成功 [FuncUserDefault setBool:YES key:is_Bind_DeviceToken];//已经上送了本机的devicetoken } failure:^(NSError *err) { - }]; - } + }]; }else if ([result isEqualToString:@"101"]){ [weakSelf.view makeToast:@"登录失败"];