From cf977559d6821a1ccce2acae076835a8037f2a90 Mon Sep 17 00:00:00 2001 From: chenqiyang <1406175257@qq.com> Date: 星期一, 05 六月 2023 11:47:18 +0800 Subject: [PATCH] 1.提交萤石demo 2.修改部分UI --- EZSDK/EZSDK/EZ/UIViewControllers/EZSettingViewController.m | 38 +++++++++++++++++++++++++++++++------- 1 files changed, 31 insertions(+), 7 deletions(-) diff --git a/EZSDK/EZSDK/EZ/UIViewControllers/EZSettingViewController.m b/EZSDK/EZSDK/EZ/UIViewControllers/EZSettingViewController.m index eafa0f0..a4071bb 100644 --- a/EZSDK/EZSDK/EZ/UIViewControllers/EZSettingViewController.m +++ b/EZSDK/EZSDK/EZ/UIViewControllers/EZSettingViewController.m @@ -13,9 +13,9 @@ #import "EZDeviceTableViewController.h" #import "EZEditViewController.h" -#import "EZDeviceVersion.h" +#import <EZOpenSDKFramework/EZDeviceVersion.h> #import "EZDeviceUpgradeViewController.h" -#import "EZStorageInfo.h" +#import <EZOpenSDKFramework/EZStorageInfo.h> #import "Toast+UIView.h" //#import "EzvizDeviceManager.h" @@ -142,6 +142,7 @@ - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; + self.navigationController.navigationBar.hidden = NO;//2021-02-01 [self.tableView reloadData]; } @@ -150,7 +151,7 @@ [_timer invalidate]; _timer = nil; } - +// self.navigationController.navigationBarHidden = YES;//2021-02-01 娣诲姞闅愯棌navigationBarHidden [super viewWillDisappear:animated]; } @@ -186,7 +187,7 @@ make.centerY.mas_equalTo(cell.contentView.mas_centerY); make.height.mas_equalTo(@20); }]; -// self.nameLabel.text = self.cameraInfo.deviceName; + self.nameLabel.text = self.deviceInfo.deviceName; } else if (indexPath.section == 1) { @@ -359,10 +360,27 @@ { __weak MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES]; hud.labelText = NSLocalizedString(@"message_deleting", @"姝e湪鍒犻櫎锛岃绋嶅��..."); - [EZOPENSDK deleteDevice:self.deviceInfo.deviceSerial completion:^(NSError *error) { - if(!error) +// [EZOPENSDK deleteDevice:self.deviceInfo.deviceSerial completion:^(NSError *error) { +// if(!error) +// { +// [hud hide:YES]; +// NSArray *viewControllers = self.navigationController.viewControllers; +// for (UIViewController *vc in viewControllers) +// { +// if([vc isKindOfClass:[EZDeviceTableViewController class]]) +// { +// ((EZDeviceTableViewController *)vc).needRefresh = YES; +// [self.navigationController popToViewController:vc animated:YES]; +// break; +// } +// } +// } +// }]; + + [EZHttpUtil.sharedManager deleteDeviceByHDL:self.deviceInfo.deviceSerial completion:^(ResponseData *responseData) { + [hud hide:YES]; + if(responseData.success) { - [hud hide:YES]; NSArray *viewControllers = self.navigationController.viewControllers; for (UIViewController *vc in viewControllers) { @@ -373,8 +391,14 @@ break; } } + }else{ + NSString *mes = [NSString stringWithFormat:@"%@(%@)",NSLocalizedString(@"setting_opration_fail", @"鎿嶄綔澶辫触"),responseData.code]; + + [self.view makeToast:mes duration:2.0 position:@"center"]; } }]; + + } } -- Gitblit v1.8.0