diff --git a/LekangGuard.xcodeproj/project.pbxproj b/LekangGuard.xcodeproj/project.pbxproj index 360a8c4..5ae5931 100644 --- a/LekangGuard.xcodeproj/project.pbxproj +++ b/LekangGuard.xcodeproj/project.pbxproj @@ -4254,7 +4254,7 @@ "$(PROJECT_DIR)/LekangGuard/Common/VoiceConvert/lib", "$(PROJECT_DIR)/LekangGuard/sdk/lib/ios", ); - MARKETING_VERSION = 1.0.2; + MARKETING_VERSION = 1.0.3; ONLY_ACTIVE_ARCH = NO; OTHER_LDFLAGS = ( "$(inherited)", @@ -4473,7 +4473,7 @@ "$(PROJECT_DIR)/LekangGuard/Common/VoiceConvert/lib", "$(PROJECT_DIR)/LekangGuard/sdk/lib/ios", ); - MARKETING_VERSION = 1.0.2; + MARKETING_VERSION = 1.0.3; ONLY_ACTIVE_ARCH = NO; OTHER_LDFLAGS = ( "$(inherited)", diff --git a/LekangGuard.xcworkspace/xcuserdata/ecell.xcuserdatad/UserInterfaceState.xcuserstate b/LekangGuard.xcworkspace/xcuserdata/ecell.xcuserdatad/UserInterfaceState.xcuserstate index 0d3e1d0..d06e569 100644 Binary files a/LekangGuard.xcworkspace/xcuserdata/ecell.xcuserdatad/UserInterfaceState.xcuserstate and b/LekangGuard.xcworkspace/xcuserdata/ecell.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/LekangGuard/Home/Homes/AddWatchViewController.m b/LekangGuard/Home/Homes/AddWatchViewController.m index ac24497..5f64b43 100644 --- a/LekangGuard/Home/Homes/AddWatchViewController.m +++ b/LekangGuard/Home/Homes/AddWatchViewController.m @@ -43,7 +43,7 @@ // Do any additional setup after loading the view. self.view.backgroundColor = KKBackgroundGrey; self.zx_navTitle = GJText(@"添加设备"); - self.sex = 2; + self.sex = 0; [self zx_setRightBtnWithText:GJText(@"添加") clickedBlock:^(ZXNavItemBtn * _Nonnull btn) { [self SetAddDevice]; }]; @@ -177,14 +177,15 @@ else if (i == 2) { /// 性别 - NSArray *sexArr = @[GJText(@"男"), - GJText(@"女"), - GJText(@"保密")]; - UIButton *sexBtn = [UICommon ui_buttonSimple:CGRectZero font:FontADA_(13) normalColor:KKTextBlackColor normalText:GJText(@"女") click:^(UIButton *btn) { - [BRStringPickerView showPickerWithTitle:GJText(@"请选择性别") dataSourceArr:sexArr selectIndex:1 resultBlock:^(BRResultModel * _Nullable resultModel) { + if (self.model.sex.length > 0) + self.sex = self.model.sex.integerValue; + NSArray *sexArr = @[GJText(@"女"), + GJText(@"男")]; + UIButton *sexBtn = [UICommon ui_buttonSimple:CGRectZero font:FontADA_(13) normalColor:KKTextBlackColor normalText:sexArr[self.sex] click:^(UIButton *btn) { + [BRStringPickerView showPickerWithTitle:GJText(@"请选择性别") dataSourceArr:sexArr selectIndex:self.sex resultBlock:^(BRResultModel * _Nullable resultModel) { [UICommon resignKeyboard]; [btn setTitle:resultModel.value forState:0]; - self.sex = resultModel.index+1; + self.sex = resultModel.index; }]; }]; sexBtn.contentHorizontalAlignment = UIControlContentHorizontalAlignmentRight; diff --git a/LekangGuard/Home/Homes/Model/DeviceModel.h b/LekangGuard/Home/Homes/Model/DeviceModel.h index 2f6713d..979bf67 100644 --- a/LekangGuard/Home/Homes/Model/DeviceModel.h +++ b/LekangGuard/Home/Homes/Model/DeviceModel.h @@ -74,7 +74,7 @@ NS_ASSUME_NONNULL_BEGIN /// string 打电话(0:不支持,1:支持) @property (nonatomic ,assign) BOOL phoneCall; -/// string 性别(1:男,2:女,3:保密) +/// string 性别(1:男,0:女) @property (nonatomic ,assign) NSInteger sex; /// string SOS号码(0.不支持,1.支持) diff --git a/LekangGuard/Home/Homes/Model/ScanCodeModel.h b/LekangGuard/Home/Homes/Model/ScanCodeModel.h index 2300890..96637b9 100644 --- a/LekangGuard/Home/Homes/Model/ScanCodeModel.h +++ b/LekangGuard/Home/Homes/Model/ScanCodeModel.h @@ -53,6 +53,9 @@ NS_ASSUME_NONNULL_BEGIN /// 班级ID @property (nonatomic ,copy) NSString *classId; +/// 性别 +@property (nonatomic ,copy) NSString *sex; + @end diff --git a/LekangGuard/Home/Homes/View/HomeHeaderView.m b/LekangGuard/Home/Homes/View/HomeHeaderView.m index 77a7cfc..b91c0ec 100644 --- a/LekangGuard/Home/Homes/View/HomeHeaderView.m +++ b/LekangGuard/Home/Homes/View/HomeHeaderView.m @@ -80,7 +80,7 @@ _devicemodel = devicemodel; self.nameLabel.text = devicemodel.name; if (devicemodel.image.length <= 0) - [self.iconImg setImage:ImageName_(devicemodel.sex == 2 ? @"icon_head_girl" : @"icon_head_boy")]; + [self.iconImg setImage:ImageName_(devicemodel.sex == 0 ? @"icon_head_girl" : @"icon_head_boy")]; else [self.iconImg sd_setImageWithURL:[NSURL URLWithString:devicemodel.image] placeholderImage:ImageName_(@"icon_head_boy")]; @@ -131,7 +131,7 @@ bannerView.imageType = KJBannerViewImageTypeNetIamge; bannerView.bannerImageViewContentMode = UIViewContentModeScaleToFill; bannerView.pageControl.selectColor = KKMainColor; - bannerView.imageDatas = @[@"home_banner"]; +// bannerView.imageDatas = @[@"home_banner"]; self.bannerView = bannerView; [self addSubview:bannerView]; diff --git a/LekangGuard/Home/MoreService (更多功能)/EditDeviceViewController.m b/LekangGuard/Home/MoreService (更多功能)/EditDeviceViewController.m index d112098..5977682 100644 --- a/LekangGuard/Home/MoreService (更多功能)/EditDeviceViewController.m +++ b/LekangGuard/Home/MoreService (更多功能)/EditDeviceViewController.m @@ -216,7 +216,7 @@ return; [self selectIcon]; }]; - UIImage *img = ImageName_(self.devModel.sex == 2 ? @"icon_head_girl" : @"icon_head_boy"); + UIImage *img = ImageName_(self.devModel.sex == 0 ? @"icon_head_girl" : @"icon_head_boy"); [iconBtn sd_setImageWithURL:[NSURL URLWithString:self.devModel.image] forState:0 placeholderImage:img]; self.iconBtn = iconBtn; [bgView addSubview:iconBtn]; @@ -273,20 +273,18 @@ else if (i == 2) { /// 性别 - NSArray *sexArr = @[GJText(@"男"), - GJText(@"女"), - GJText(@"保密")]; - NSInteger sexs = self.devModel.sex-1 < 0 ? 2 : self.devModel.sex-1; + NSArray *sexArr = @[ GJText(@"女"), + GJText(@"男")]; self.Sex = self.devModel.sex; - UIButton *sexBtn = [UICommon ui_buttonSimple:CGRectZero font:FontADA_(13) normalColor:KKGrey121 normalText:sexArr[sexs] click:^(UIButton *btn) { + UIButton *sexBtn = [UICommon ui_buttonSimple:CGRectZero font:FontADA_(13) normalColor:KKGrey121 normalText:sexArr[self.Sex] click:^(UIButton *btn) { [UICommon resignKeyboard]; if (self.devModel.identity != 2) return; if (!self.isEdit) return; - [BRStringPickerView showPickerWithTitle:GJText(@"请选择性别") dataSourceArr:sexArr selectIndex:self.devModel.sex-1 resultBlock:^(BRResultModel * _Nullable resultModel) { + [BRStringPickerView showPickerWithTitle:GJText(@"请选择性别") dataSourceArr:sexArr selectIndex:self.Sex resultBlock:^(BRResultModel * _Nullable resultModel) { [btn setTitle:resultModel.value forState:0]; - self.Sex = resultModel.index+1; + self.Sex = resultModel.index; }]; }]; sexBtn.contentHorizontalAlignment = UIControlContentHorizontalAlignmentRight; diff --git a/LekangGuard/Home/MoreService (更多功能)/Model/EditDeviceModel.h b/LekangGuard/Home/MoreService (更多功能)/Model/EditDeviceModel.h index 661a15d..0e86052 100644 --- a/LekangGuard/Home/MoreService (更多功能)/Model/EditDeviceModel.h +++ b/LekangGuard/Home/MoreService (更多功能)/Model/EditDeviceModel.h @@ -44,7 +44,7 @@ NS_ASSUME_NONNULL_BEGIN /// string example: 学校名称 @property (nonatomic ,copy) NSString *schName; -/// string example: 设备拥有者性别(1.男,2.女,3.保密) +/// string example: 设备拥有者性别(1.男,0.女,2.保密) @property (nonatomic ,assign) NSInteger sex; /// string example: 设备拥有者体重 diff --git a/LekangGuard/Home/MoreService (更多功能)/QRCodeMsgViewController.m b/LekangGuard/Home/MoreService (更多功能)/QRCodeMsgViewController.m index 89ff8a4..acfd969 100644 --- a/LekangGuard/Home/MoreService (更多功能)/QRCodeMsgViewController.m +++ b/LekangGuard/Home/MoreService (更多功能)/QRCodeMsgViewController.m @@ -71,9 +71,9 @@ }]; if (APIManager.sharedManager.deviceModel.image.length <= 0) - iconImg.image = ImageName_(APIManager.sharedManager.deviceModel.sex == 2 ? @"icon_head_girl" : @"icon_head_boy"); + iconImg.image = ImageName_(APIManager.sharedManager.deviceModel.sex == 0 ? @"icon_head_girl" : @"icon_head_boy"); else - [iconImg sd_setImageWithURL:[NSURL URLWithString:APIManager.sharedManager.deviceModel.image] placeholderImage:ImageName_(APIManager.sharedManager.deviceModel.sex == 2 ? @"icon_head_girl" : @"icon_head_boy")]; + [iconImg sd_setImageWithURL:[NSURL URLWithString:APIManager.sharedManager.deviceModel.image] placeholderImage:ImageName_(APIManager.sharedManager.deviceModel.sex == 0 ? @"icon_head_girl" : @"icon_head_boy")]; diff --git a/LekangGuard/Home/VideoChat(视频聊天)/1v1/JuPhoonCallViewController.m b/LekangGuard/Home/VideoChat(视频聊天)/1v1/JuPhoonCallViewController.m index 8f121db..fc8784a 100644 --- a/LekangGuard/Home/VideoChat(视频聊天)/1v1/JuPhoonCallViewController.m +++ b/LekangGuard/Home/VideoChat(视频聊天)/1v1/JuPhoonCallViewController.m @@ -273,7 +273,7 @@ //等待时的图片 //判断性别 NSString *sexImageName; - if(self.device.sex == 2) + if(self.device.sex == 0) { //女 sexImageName = @"icon_girl_head_portrait"; diff --git a/LekangGuard/Home/VideoChat(视频聊天)/Agora/CallViewController.m b/LekangGuard/Home/VideoChat(视频聊天)/Agora/CallViewController.m index de4d38c..098cc00 100755 --- a/LekangGuard/Home/VideoChat(视频聊天)/Agora/CallViewController.m +++ b/LekangGuard/Home/VideoChat(视频聊天)/Agora/CallViewController.m @@ -107,7 +107,7 @@ self.headImageView.layer.cornerRadius = 4; self.headImageView.layer.masksToBounds = YES; //判断性别 - NSString *sexImageName = APIManager.sharedManager.deviceModel.sex == 2 ? @"icon_girl_head_portrait" : @"icon_boy_head_portrait"; + NSString *sexImageName = APIManager.sharedManager.deviceModel.sex == 0 ? @"icon_girl_head_portrait" : @"icon_boy_head_portrait"; [self.headImageView sd_setImageWithURL:[NSURL URLWithString:APIManager.sharedManager.deviceModel.image] placeholderImage:ImageName_(sexImageName) options:SDWebImageRetryFailed]; diff --git a/LekangGuard/Home/VideoChat(视频聊天)/VideoChatViewController.m b/LekangGuard/Home/VideoChat(视频聊天)/VideoChatViewController.m index 1e679d9..3e25d05 100644 --- a/LekangGuard/Home/VideoChat(视频聊天)/VideoChatViewController.m +++ b/LekangGuard/Home/VideoChat(视频聊天)/VideoChatViewController.m @@ -168,7 +168,7 @@ iconView.layer.cornerRadius = 8; iconView.layer.masksToBounds = YES; if (APIManager.sharedManager.deviceModel.image.length <= 0) - [iconView setImage:ImageName_(APIManager.sharedManager.deviceModel.sex == 2 ? @"icon_head_girl" : @"icon_head_boy")]; + [iconView setImage:ImageName_(APIManager.sharedManager.deviceModel.sex == 0 ? @"icon_head_girl" : @"icon_head_boy")]; else [iconView sd_setImageWithURL:[NSURL URLWithString:APIManager.sharedManager.deviceModel.image] placeholderImage:ImageName_(@"")]; [_headerView addSubview:iconView]; diff --git a/LekangGuard/LekangGuard.pch b/LekangGuard/LekangGuard.pch index dff5f32..312e950 100644 --- a/LekangGuard/LekangGuard.pch +++ b/LekangGuard/LekangGuard.pch @@ -76,7 +76,7 @@ #define WXAPPID @"wx8fa47f6e10667217" #define WXAPPSecret @"c0eb6ff1a08ecc3cf986a8ea03d94f61" //高德地图 Key -#define AMapKey @"替换成自己的key" +#define AMapKey @"cc2e8880f53e768cc84c374f403ef4d4" //APP 在屏幕上显示的名字 #define APPName [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleDisplayName"] diff --git a/LekangGuard/Managers/APIManager.m b/LekangGuard/Managers/APIManager.m index cb012d4..2a3f786 100644 --- a/LekangGuard/Managers/APIManager.m +++ b/LekangGuard/Managers/APIManager.m @@ -9,13 +9,13 @@ #import "APRequestSerializer.h" #import "AppDelegate.h" -#ifdef DEBUG +//#ifdef DEBUG //测试环境 NSString *const dHostUrl = @"http://lb-mi23utxo-em1lnrk4gizs2pu8.clb.ap-nanjing.tencentclb.com:8822"; -#else -//正式环境 -NSString *const dHostUrl = @"http://lb-mi23utxo-em1lnrk4gizs2pu8.clb.ap-nanjing.tencentclb.com:8822"; -#endif +//#else +////正式环境 +//NSString *const dHostUrl = @"http://lb-mi23utxo-em1lnrk4gizs2pu8.clb.ap-nanjing.tencentclb.com:8822"; +//#endif NSString *const sRelogin = @"sRelogin"; diff --git a/LekangGuard/Map/Track(轨迹)/TrackMapView.h b/LekangGuard/Map/Track(轨迹)/TrackMapView.h index 1914ab6..4fc8729 100644 --- a/LekangGuard/Map/Track(轨迹)/TrackMapView.h +++ b/LekangGuard/Map/Track(轨迹)/TrackMapView.h @@ -15,7 +15,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic ,strong) TrackInfoModel *curLocate; -- (void)loadWithInfoTrack:(NSArray *)mapPoints; +- (void)loadWithInfoTrack:(NSMutableArray *)mapPoints; - (void)topViewShowAndHidden:(NSInteger)isShow; diff --git a/LekangGuard/Map/Track(轨迹)/TrackMapView.m b/LekangGuard/Map/Track(轨迹)/TrackMapView.m index 7d94c58..bf69a1b 100644 --- a/LekangGuard/Map/Track(轨迹)/TrackMapView.m +++ b/LekangGuard/Map/Track(轨迹)/TrackMapView.m @@ -174,9 +174,10 @@ //MARK: 重新加载地图轨迹数据 -- (void)loadWithInfoTrack:(NSArray *)mapPoints +- (void)loadWithInfoTrack:(NSMutableArray *)mapPoints { // self.startAndStopBtn.selected = NO; + mapPoints = (NSMutableArray *)[[mapPoints reverseObjectEnumerator] allObjects]; [self startAndStopBtnAction:self.startAndStopBtn]; [self.mapView removeAnnotations:self.pointAnnotationArr]; [self.mapView removeOverlay:self.routeLine]; diff --git a/LekangGuard/Map/Track(轨迹)/TrackViewController.m b/LekangGuard/Map/Track(轨迹)/TrackViewController.m index 41ffe63..1b2baa8 100644 --- a/LekangGuard/Map/Track(轨迹)/TrackViewController.m +++ b/LekangGuard/Map/Track(轨迹)/TrackViewController.m @@ -62,7 +62,7 @@ make.top.equalTo(self.view).offset(iPhoneX_NavHeight+Adapted(50)+0.5); make.bottom.equalTo(self.view.mas_bottom); }]; - [self.view addSubview:self.trackMapView]; + [self.view addSubview:self.topView]; [self GetTrackInfo]; @@ -138,11 +138,25 @@ - (void)mapShowAndHidden:(NSInteger)type { + if (type == 1) + { + [self.view addSubview:self.trackMapView]; + [self.trackMapView loadWithInfoTrack:self.modelListArr]; + } CGFloat yy = iPhoneX_NavHeight+self.topView.height+0.5; [UIView animateWithDuration:0.5 animations:^{ self.trackMapView.frame = CGRectMake(0,type == 1 ? yy : SCREEN_HEIGHT, SCREEN_WIDTH, SCREEN_HEIGHT-yy); } completion:^(BOOL finished) { [self.trackMapView topViewShowAndHidden:type]; + if (type == 0) + { + for(UIView *mapview in [self.view subviews]) + { + if ([mapview isKindOfClass:[TrackMapView class]]) { + [mapview removeFromSuperview]; + } + } + } }]; } @@ -170,7 +184,7 @@ self.comTable.tableHeaderView = arr.count > 0 ? self.headerView : nil; self.comTable.tableHeaderView.height = arr.count > 0 ? Adapted(60) : 0; self.numberLabel.attributedText = [UICommon labelFontSize:arr.count > 0 ? F(@"%ld %@", arr.count,GJText(@"条轨迹")) : @""]; - [self.trackMapView loadWithInfoTrack:self.modelListArr]; +// [self.trackMapView loadWithInfoTrack:self.modelListArr]; [self.comTable reloadData]; self.zx_navRightBtn.hidden = self.modelListArr.count > 0 ? NO : YES; diff --git a/LekangGuard/Map/VC/View/CustomAnnotationView.m b/LekangGuard/Map/VC/View/CustomAnnotationView.m index 13bbacf..7922d85 100644 --- a/LekangGuard/Map/VC/View/CustomAnnotationView.m +++ b/LekangGuard/Map/VC/View/CustomAnnotationView.m @@ -17,7 +17,7 @@ -(void)setImageWithURLString:(NSString*)urlString { NSString *imageName = @"设备默认头像"; - if(APIManager.sharedManager.deviceModel.sex == 2) + if(APIManager.sharedManager.deviceModel.sex == 0) { //女 imageName = @"icon_head_girl"; diff --git a/LekangGuard/Map/VC/View/GoogleMapView.m b/LekangGuard/Map/VC/View/GoogleMapView.m index 8721216..16fbca9 100644 --- a/LekangGuard/Map/VC/View/GoogleMapView.m +++ b/LekangGuard/Map/VC/View/GoogleMapView.m @@ -134,7 +134,7 @@ UIImageView *iconImg = [[UIImageView alloc] init]; NSString *imageName = @"设备默认头像"; - if(APIManager.sharedManager.deviceModel.sex == 2) + if(APIManager.sharedManager.deviceModel.sex == 0) { //女 imageName = @"icon_head_girl"; diff --git a/LekangGuard/Protection(守护星)/VC/DeviceSwitchover.m b/LekangGuard/Protection(守护星)/VC/DeviceSwitchover.m index b8cb357..467989a 100644 --- a/LekangGuard/Protection(守护星)/VC/DeviceSwitchover.m +++ b/LekangGuard/Protection(守护星)/VC/DeviceSwitchover.m @@ -47,7 +47,7 @@ for (DeviceModel *model in APIManager.sharedManager.deviceList) { if (![model.image hasPrefix:@"https://"] && ![model.image hasPrefix:@"http://"]) - [icons addObject:model.sex == 2 ? @"icon_girl_head_portrait" : @"icon_boy_head_portrait"]; + [icons addObject:model.sex == 0 ? @"icon_girl_head_portrait" : @"icon_boy_head_portrait"]; else [icons addObject:model.image]; [titles addObject:model.name]; diff --git a/LekangGuard/Protection(守护星)/View/DeviceMsgHeaderView.m b/LekangGuard/Protection(守护星)/View/DeviceMsgHeaderView.m index af58449..95bd8aa 100644 --- a/LekangGuard/Protection(守护星)/View/DeviceMsgHeaderView.m +++ b/LekangGuard/Protection(守护星)/View/DeviceMsgHeaderView.m @@ -201,7 +201,7 @@ self.bnLabel.text = F(@"%@%@",APIManager.sharedManager.deviceModel.gradeName,APIManager.sharedManager.deviceModel.className); self.IdLabel.text = [NSString stringWithFormat:@"IMEI:%@",APIManager.sharedManager.deviceModel.imei]; if (APIManager.sharedManager.deviceModel.image.length <= 0) - [self.iconImg setImage:ImageName_(APIManager.sharedManager.deviceModel.sex == 2 ? @"icon_head_girl" : @"icon_head_boy")]; + [self.iconImg setImage:ImageName_(APIManager.sharedManager.deviceModel.sex == 0 ? @"icon_head_girl" : @"icon_head_boy")]; else [self.iconImg sd_setImageWithURL:[NSURL URLWithString:APIManager.sharedManager.deviceModel.image] placeholderImage:ImageName_(@"icon_head_boy")]; self.signalImg.image = APIManager.sharedManager.laloModel.onlineStatus ? ImageName_(@"icon_device_connected") : ImageName_(@"icon_device_unconnected");