|
@@ -160,6 +160,16 @@
|
|
|
make.top.mas_equalTo(0);
|
|
|
make.bottom.mas_equalTo(0);
|
|
|
}];
|
|
|
+
|
|
|
+ KWeakSelf
|
|
|
+ _cloudPhoneSetV.didClickButtonFun = ^(NSInteger tag) {
|
|
|
+ if (tag == 10) {//重启
|
|
|
+ [weakSelf didClickRestartFun];
|
|
|
+ }
|
|
|
+ else if (tag == 11){//恢复出厂
|
|
|
+ [weakSelf RestoreFactoryingFun];
|
|
|
+ }
|
|
|
+ };
|
|
|
}
|
|
|
break;
|
|
|
case 2:
|
|
@@ -174,6 +184,136 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+#pragma mark 点击了重启空间
|
|
|
+- (void)didClickRestartFun
|
|
|
+{
|
|
|
+ KWeakSelf
|
|
|
+ /*弹窗提示重启*/
|
|
|
+ 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:^{
|
|
|
+ [weakSelf sureToRestartCloudPhoneFun];
|
|
|
+ } didClickCancel:^{
|
|
|
+
|
|
|
+ }];
|
|
|
+ nextVC.modalPresentationStyle = UIModalPresentationCustom;
|
|
|
+
|
|
|
+ [self presentViewController:nextVC animated:YES completion:^{
|
|
|
+ nextVC.view.superview.backgroundColor = [UIColor clearColor];
|
|
|
+ }];
|
|
|
+}
|
|
|
+
|
|
|
+#pragma mark 确认重启云机
|
|
|
+- (void)sureToRestartCloudPhoneFun{
|
|
|
+// /*重启云手机*/
|
|
|
+// 通过指令通道发送 {"type":"reboot"}
|
|
|
+ [[webSocketManager shareInstance] needToRebootFun];
|
|
|
+
|
|
|
+ //提示语
|
|
|
+ [[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
|
|
|
+{
|
|
|
+ [[webSocketManager shareInstance] needToResetFun];
|
|
|
+
|
|
|
+ [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.changeSn;
|
|
|
+ if(snStr){
|
|
|
+ [[connectDeviceManager shareInstance] getThridMsgBySN:snStr needReconnect:YES didNetEnd:^(NSInteger didSuc) {
|
|
|
+ if(didSuc){
|
|
|
+
|
|
|
+ }
|
|
|
+ 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:^{
|
|
|
+
|
|
|
+ }];
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ nextVC.modalPresentationStyle = UIModalPresentationCustom;
|
|
|
+
|
|
|
+ [self presentViewController:nextVC animated:YES completion:^{
|
|
|
+ nextVC.view.superview.backgroundColor = [UIColor clearColor];
|
|
|
+ }];
|
|
|
+}
|
|
|
+
|
|
|
|
|
|
- (void)viewWillAppear:(BOOL)animated{
|
|
|
[super viewWillAppear:animated];
|