Browse Source

【bug修复】修复轨迹播放等bug

master
公司电脑 1 year ago
parent
commit
28135d2a30
  1. 4
      LekangGuard.xcodeproj/project.pbxproj
  2. BIN
      LekangGuard.xcworkspace/xcuserdata/ecell.xcuserdatad/UserInterfaceState.xcuserstate
  3. 15
      LekangGuard/Home/Homes/AddWatchViewController.m
  4. 2
      LekangGuard/Home/Homes/Model/DeviceModel.h
  5. 3
      LekangGuard/Home/Homes/Model/ScanCodeModel.h
  6. 4
      LekangGuard/Home/Homes/View/HomeHeaderView.m
  7. 14
      LekangGuard/Home/MoreService (更多功能)/EditDeviceViewController.m
  8. 2
      LekangGuard/Home/MoreService (更多功能)/Model/EditDeviceModel.h
  9. 4
      LekangGuard/Home/MoreService (更多功能)/QRCodeMsgViewController.m
  10. 2
      LekangGuard/Home/VideoChat(视频聊天)/1v1/JuPhoonCallViewController.m
  11. 2
      LekangGuard/Home/VideoChat(视频聊天)/Agora/CallViewController.m
  12. 2
      LekangGuard/Home/VideoChat(视频聊天)/VideoChatViewController.m
  13. 2
      LekangGuard/LekangGuard.pch
  14. 10
      LekangGuard/Managers/APIManager.m
  15. 2
      LekangGuard/Map/Track(轨迹)/TrackMapView.h
  16. 3
      LekangGuard/Map/Track(轨迹)/TrackMapView.m
  17. 18
      LekangGuard/Map/Track(轨迹)/TrackViewController.m
  18. 2
      LekangGuard/Map/VC/View/CustomAnnotationView.m
  19. 2
      LekangGuard/Map/VC/View/GoogleMapView.m
  20. 2
      LekangGuard/Protection(守护星)/VC/DeviceSwitchover.m
  21. 2
      LekangGuard/Protection(守护星)/View/DeviceMsgHeaderView.m

4
LekangGuard.xcodeproj/project.pbxproj

@ -4254,7 +4254,7 @@ @@ -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 @@ @@ -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)",

BIN
LekangGuard.xcworkspace/xcuserdata/ecell.xcuserdatad/UserInterfaceState.xcuserstate generated

Binary file not shown.

15
LekangGuard/Home/Homes/AddWatchViewController.m

@ -43,7 +43,7 @@ @@ -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 @@ @@ -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;

2
LekangGuard/Home/Homes/Model/DeviceModel.h

@ -74,7 +74,7 @@ NS_ASSUME_NONNULL_BEGIN @@ -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.支持)

3
LekangGuard/Home/Homes/Model/ScanCodeModel.h

@ -53,6 +53,9 @@ NS_ASSUME_NONNULL_BEGIN @@ -53,6 +53,9 @@ NS_ASSUME_NONNULL_BEGIN
/// 班级ID
@property (nonatomic ,copy) NSString *classId;
/// 性别
@property (nonatomic ,copy) NSString *sex;
@end

4
LekangGuard/Home/Homes/View/HomeHeaderView.m

@ -80,7 +80,7 @@ @@ -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 @@ @@ -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];

14
LekangGuard/Home/MoreService (更多功能)/EditDeviceViewController.m

@ -216,7 +216,7 @@ @@ -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 @@ @@ -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;

2
LekangGuard/Home/MoreService (更多功能)/Model/EditDeviceModel.h

@ -44,7 +44,7 @@ NS_ASSUME_NONNULL_BEGIN @@ -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: 设备拥有者体重

4
LekangGuard/Home/MoreService (更多功能)/QRCodeMsgViewController.m

@ -71,9 +71,9 @@ @@ -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")];

2
LekangGuard/Home/VideoChat(视频聊天)/1v1/JuPhoonCallViewController.m

@ -273,7 +273,7 @@ @@ -273,7 +273,7 @@
//等待时的图片
//判断性别
NSString *sexImageName;
if(self.device.sex == 2)
if(self.device.sex == 0)
{
//
sexImageName = @"icon_girl_head_portrait";

2
LekangGuard/Home/VideoChat(视频聊天)/Agora/CallViewController.m

@ -107,7 +107,7 @@ @@ -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];

2
LekangGuard/Home/VideoChat(视频聊天)/VideoChatViewController.m

@ -168,7 +168,7 @@ @@ -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];

2
LekangGuard/LekangGuard.pch

@ -76,7 +76,7 @@ @@ -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"]

10
LekangGuard/Managers/APIManager.m

@ -9,13 +9,13 @@ @@ -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";

2
LekangGuard/Map/Track(轨迹)/TrackMapView.h

@ -15,7 +15,7 @@ NS_ASSUME_NONNULL_BEGIN @@ -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;

3
LekangGuard/Map/Track(轨迹)/TrackMapView.m

@ -174,9 +174,10 @@ @@ -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];

18
LekangGuard/Map/Track(轨迹)/TrackViewController.m

@ -62,7 +62,7 @@ @@ -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 @@ @@ -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 @@ @@ -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;

2
LekangGuard/Map/VC/View/CustomAnnotationView.m

@ -17,7 +17,7 @@ @@ -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";

2
LekangGuard/Map/VC/View/GoogleMapView.m

@ -134,7 +134,7 @@ @@ -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";

2
LekangGuard/Protection(守护星)/VC/DeviceSwitchover.m

@ -47,7 +47,7 @@ @@ -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];

2
LekangGuard/Protection(守护星)/View/DeviceMsgHeaderView.m

@ -201,7 +201,7 @@ @@ -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");

Loading…
Cancel
Save