|
@@ -19,6 +19,7 @@
|
|
|
#import "ComontAlretViewController.h"
|
|
|
#import "ModifyPWDFirstViewController.h"
|
|
|
#import "TipsQRCodeForChangeDeviceViewController.h"
|
|
|
+#import "connectDeviceManager.h"
|
|
|
|
|
|
@interface MySetViewController ()<HelpDownScrollViewDelegate,UITableViewDelegate,UITableViewDataSource,ComontAlretViewControllerDelegate>
|
|
|
{
|
|
@@ -83,6 +84,7 @@
|
|
|
/*弹窗提示TV投屏*/
|
|
|
ComontAlretViewController *nextVC = [[ComontAlretViewController alloc] initWithTiTle:NSLocalizedString(@"my_set_TVP2P_Open_title",nil)
|
|
|
msg:NSLocalizedString(@"my_set_TVP2P_Open_Subtitle",nil)
|
|
|
+ imageStr:nil
|
|
|
cancelTitle:NSLocalizedString(@"my_set_TVP2P_Open_sure",nil)
|
|
|
okTitle:nil isOkBtnHighlight:NO
|
|
|
didClickOk:^{
|
|
@@ -145,7 +147,6 @@
|
|
|
_tableView.sectionHeaderTopPadding = 0;
|
|
|
}
|
|
|
|
|
|
- //TV投屏 阿胡说暂不做
|
|
|
[_tableView setTableFooterView:[self tableFoorView]];
|
|
|
}
|
|
|
|
|
@@ -158,9 +159,9 @@
|
|
|
}
|
|
|
|
|
|
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
|
|
|
- //return 7;
|
|
|
+ return 7;
|
|
|
//return 6;//去掉隐藏进程
|
|
|
- return 5;//去掉更换icon
|
|
|
+ //return 5;//去掉更换icon
|
|
|
}
|
|
|
|
|
|
- (MineViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
|
|
@@ -217,7 +218,13 @@
|
|
|
[cell.titleLabel setText:NSLocalizedString(@"my_set_no_change_phone",nil)];
|
|
|
[cell.mImageView setImage:[UIImage imageNamed:@"icon_change_ohone"]];
|
|
|
//}else if (row == 6){
|
|
|
- }else if (row == 4){
|
|
|
+ }else if (row == 4){/*常见问题*/
|
|
|
+ [cell.titleLabel setText:NSLocalizedString(@"my_set_no_common_problem",nil)];
|
|
|
+ [cell.mImageView setImage:[UIImage imageNamed:@"icon_common_problem"]];
|
|
|
+ }else if (row == 5){/*回复出厂*/
|
|
|
+ [cell.titleLabel setText:NSLocalizedString(@"my_set_no_Restore_Factory",nil)];
|
|
|
+ [cell.mImageView setImage:[UIImage imageNamed:@"icon_Restore_Factory"]];
|
|
|
+ }else if (row == 6){/*重启空间*/
|
|
|
[cell.titleLabel setText:NSLocalizedString(@"my_set_no_restart_phone",nil)];
|
|
|
[cell.mImageView setImage:[UIImage imageNamed:@"icon-gengxin"]];
|
|
|
/*下圆角*/
|
|
@@ -266,11 +273,15 @@
|
|
|
}else if (3 == row){/*更换设备*/
|
|
|
TipsQRCodeForChangeDeviceViewController *vc = [[TipsQRCodeForChangeDeviceViewController alloc] init];
|
|
|
[self.navigationController pushViewController:vc animated:YES];
|
|
|
-// }else if (6 == row){/*重启空间*/
|
|
|
- }else if (4 == row){/*重启空间*/
|
|
|
+ }else if (4 == row){/*常见问题*/
|
|
|
+ [[iToast makeText:@"常见问题待接入"] show];
|
|
|
+ }else if (5 == row){/*恢复出厂*/
|
|
|
+ [self RestoreFactoryAleartFun];
|
|
|
+ }else if (6 == row){/*重启空间*/
|
|
|
/*弹窗提示重启*/
|
|
|
ComontAlretViewController *nextVC = [[ComontAlretViewController alloc] initWithTiTle:NSLocalizedString(@"my_set_no_restart_phone_tips",nil)
|
|
|
msg:nil
|
|
|
+ imageStr:nil
|
|
|
cancelTitle:NSLocalizedString(@"other_cancel",nil)
|
|
|
okTitle:NSLocalizedString(@"my_set_no_restart_phone_btn_ok",nil) isOkBtnHighlight:NO
|
|
|
didClickOk:^{
|
|
@@ -297,4 +308,106 @@
|
|
|
[[iToast makeText:NSLocalizedString(@"player_link_rebooting_Tips",nil)] show];
|
|
|
}
|
|
|
|
|
|
+#pragma mark 点击恢复出厂
|
|
|
+- (void)RestoreFactoryAleartFun
|
|
|
+{
|
|
|
+ KWeakSelf
|
|
|
+ /*弹窗提示恢复出厂*/
|
|
|
+ ComontAlretViewController *nextVC = [[ComontAlretViewController alloc] initWithTiTle:NSLocalizedString(@"my_set_no_Restore_Factory_tips",nil)
|
|
|
+ msg:NSLocalizedString(@"my_set_no_Restore_Factory_msg",nil)
|
|
|
+ imageStr:@"icon_Restore_Factory_big"
|
|
|
+ cancelTitle:NSLocalizedString(@"my_set_TVP2P_Open_sure",nil)
|
|
|
+ okTitle:NSLocalizedString(@"other_cancel",nil) isOkBtnHighlight:YES
|
|
|
+ didClickOk:^{
|
|
|
+
|
|
|
+ } didClickCancel:^{
|
|
|
+ //点击确定
|
|
|
+ [weakSelf gotoResetFun];
|
|
|
+ }];
|
|
|
+ nextVC.modalPresentationStyle = UIModalPresentationCustom;
|
|
|
+
|
|
|
+ [self presentViewController:nextVC animated:YES completion:^{
|
|
|
+ nextVC.view.superview.backgroundColor = [UIColor clearColor];
|
|
|
+ }];
|
|
|
+}
|
|
|
+
|
|
|
+#pragma mark 点击了恢复出厂
|
|
|
+- (void)gotoResetFun
|
|
|
+{
|
|
|
+ if(_needToReset){
|
|
|
+ _needToReset();
|
|
|
+ }
|
|
|
+
|
|
|
+ [self RestoreFactoryingFun];
|
|
|
+}
|
|
|
+
|
|
|
+#pragma mark 恢复出厂中
|
|
|
+- (void)RestoreFactoryingFun
|
|
|
+{
|
|
|
+ KWeakSelf
|
|
|
+ /*弹窗提示恢复出厂*/
|
|
|
+ ComontAlretViewController *nextVC = [[ComontAlretViewController alloc] initWithTiTle:NSLocalizedString(@"my_set_no_Restore_Factorying_tips",nil)
|
|
|
+ msg:NSLocalizedString(@"my_set_no_Restore_Factorying_msg",nil)
|
|
|
+ imageStr:nil
|
|
|
+ cancelTitle:NSLocalizedString(@"my_set_no_Restore_Factorying",nil)
|
|
|
+ okTitle:nil
|
|
|
+ isOkBtnHighlight:NO
|
|
|
+ didClickOk:^{
|
|
|
+ [weakSelf RestoreFactoryCompleteFun];
|
|
|
+ } didClickCancel:^{
|
|
|
+
|
|
|
+ }];
|
|
|
+
|
|
|
+ [nextVC setButtonCountdownFun:180];//90
|
|
|
+
|
|
|
+ nextVC.modalPresentationStyle = UIModalPresentationCustom;
|
|
|
+
|
|
|
+ [self presentViewController:nextVC animated:YES completion:^{
|
|
|
+ nextVC.view.superview.backgroundColor = [UIColor clearColor];
|
|
|
+ }];
|
|
|
+}
|
|
|
+
|
|
|
+#pragma mark 恢复出厂倒计时结束
|
|
|
+- (void)RestoreFactoryCompleteFun
|
|
|
+{
|
|
|
+ KWeakSelf
|
|
|
+ //瑞云发起重连
|
|
|
+ NSString *snStr = [connectDeviceManager shareInstance].DeviceThirdIdMod.data.sn;
|
|
|
+ if(snStr){
|
|
|
+ [[connectDeviceManager shareInstance] getThridMsgBySN:snStr needReconnect:YES didNetEnd:^(bool didSuc) {
|
|
|
+ if(didSuc){
|
|
|
+ if(self->_needToResetAndOk){
|
|
|
+ self->_needToResetAndOk();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ [weakSelf RestoreFactoryCompleteFun];
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }];
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /*弹窗提示恢复出厂*/
|
|
|
+ ComontAlretViewController *nextVC = [[ComontAlretViewController alloc] initWithTiTle:NSLocalizedString(@"my_set_no_Restore_Factory_ok_tips",nil)
|
|
|
+ msg:NSLocalizedString(@"my_set_no_Restore_Factory_ok_msg",nil)
|
|
|
+ imageStr:nil
|
|
|
+ cancelTitle:NSLocalizedString(@"my_set_no_Restore_FactoryOK",nil)
|
|
|
+ okTitle:nil
|
|
|
+ isOkBtnHighlight:NO
|
|
|
+ didClickOk:^{
|
|
|
+
|
|
|
+ } didClickCancel:^{
|
|
|
+ [weakSelf.navigationController popViewControllerAnimated:YES];
|
|
|
+ }];
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ nextVC.modalPresentationStyle = UIModalPresentationCustom;
|
|
|
+
|
|
|
+ [self presentViewController:nextVC animated:YES completion:^{
|
|
|
+ nextVC.view.superview.backgroundColor = [UIColor clearColor];
|
|
|
+ }];
|
|
|
+}
|
|
|
+
|
|
|
@end
|