浏览代码

1.bug修复

huangxiaodong 1 年之前
父节点
当前提交
3f3627b78a

+ 4 - 0
创维盒子/双子星云手机/Class/Guide/inputPWDViewController.m

@@ -56,6 +56,10 @@
         make.top.mas_equalTo(30.f + safeArea);
     }];
     
+    if(_isCheckPwdType){
+        saobut.hidden = YES;
+    }
+    
     /*设置密码标题*/
     UILabel *topLabel = [[UILabel alloc] init];
     [topLabel setFont:[UIFont boldSystemFontOfSize:16.f]];

+ 3 - 0
创维盒子/双子星云手机/CloudPlayer/PlayerViewController+otherDelegate.h

@@ -18,6 +18,9 @@ NS_ASSUME_NONNULL_BEGIN
 
 - (void)checkVersionFun;
 
+//强制重启
+- (void)updateForceStartFun;
+
 - (void)beginGotoUploadFileFun:(NSNotification *)notification;
 - (void)suspendUploadFileFun:(NSNotification *)notification;
 

+ 27 - 0
创维盒子/双子星云手机/CloudPlayer/PlayerViewController+otherDelegate.mm

@@ -14,6 +14,7 @@
 #import "HWVersionModel.h"
 #import <MJExtension.h>
 #import "HaveNewVersionView.h"
+#import "connectDeviceManager.h"
 
 @implementation PlayerViewController (otherDelegate)
 
@@ -77,6 +78,32 @@
     };
 }
 
+#pragma mark 需要强制重启
+- (void)updateForceStartFun{
+    
+    
+    NSString* curSn = [connectDeviceManager shareInstance].DeviceThirdIdMod.data.sn;
+    
+    NSMutableDictionary *paraDict = [NSMutableDictionary dictionary];
+    [paraDict setValue:curSn forKey:@"sn"];
+    [paraDict setValue:[NSNumber numberWithBool:YES] forKey:@"isForceStart"];
+    
+    [[netWorkManager shareInstance] CommonPostCallBackCode:updateForceStart Parameters:paraDict success:^(id  _Nonnull responseObject) {
+        
+      SuperModel *model = [[SuperModel alloc] initWithDictionary:responseObject error:nil];
+
+       if (model.status == 0) {
+          
+       }
+       else
+       {
+           
+       }
+
+    } failure:^(NSError * _Nonnull error) {
+       HLog(@"%@", error);
+    }];
+}
 
 - (void)showNewVersion:(HWVersionModel*)versionModel {
     

+ 38 - 2
创维盒子/双子星云手机/CloudPlayer/PlayerViewController.mm

@@ -117,6 +117,8 @@ ComontAlretViewControllerDelegate>
     ComontAlretViewController *logoutAlertVC;
     /*弹窗提示链接失败 网络或者云机*/
     ComontAlretViewController *linkFailAlretVC;
+    
+    NSTimer *forceStartTimer;//请知重启timer
 }
 @property (nonatomic, strong, nullable) RCVideoRecoderManager *recoderManager;
 @property (nonatomic, strong, nullable) RCAudioRecoderMamager *audioRecoderMamager;
@@ -712,7 +714,9 @@ ComontAlretViewControllerDelegate>
             else if ([messageType isEqualToString:@"TvStatus"]){/*获取TV投屏信息*/
                 [weakSelf getCouldPhoneTvStatusResponseFun:dataDict];
             }
-            
+            else if ([messageType isEqualToString:@"reboot"]){/*重启*/
+                [weakSelf stopForceStartTimerFun];
+            }
         } failure:^(NSError *error) {
             [self showNetErrorAlertFun:2];
         }];
@@ -1056,7 +1060,7 @@ ComontAlretViewControllerDelegate>
             }
             
             //重启后重连 出来的
-            if(_isRebootIngType){
+            if(_isRebootIngType && !forceStartTimer){
                 mainBlock(^{
                     [[iToast makeText:NSLocalizedString(@"player_link_reboot_suc_Tips",nil)] show];
                 });
@@ -1449,6 +1453,8 @@ NSDate *lastVideoTome;/*上一帧数据时间*/
         NSString *commondStr  = @"{\"type\":\"reboot\"}";
         [weakSelf send_data:commondStr];
         
+        [weakSelf startForceStartTimerFun];
+        
         //最后一帧 没显示正在重启问题
         self->_canShowImgAndVoiceType = YES;
         
@@ -1509,6 +1515,36 @@ NSDate *lastVideoTome;/*上一帧数据时间*/
     };
 }
 
+#pragma mark 启动timer 30秒后检查是否软件重启成功
+- (void)startForceStartTimerFun
+{
+    if(forceStartTimer){
+        [forceStartTimer invalidate];
+        forceStartTimer = nil;
+    }
+    
+    forceStartTimer = [NSTimer scheduledTimerWithTimeInterval:3 target:self selector:@selector(gotoUpdateForceStartFun) userInfo:nil repeats:NO];
+    [[NSRunLoop currentRunLoop] addTimer:forceStartTimer forMode:NSRunLoopCommonModes];
+}
+
+- (void)gotoUpdateForceStartFun
+{
+    [self updateForceStartFun];
+    
+    KWeakSelf
+    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(30 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+        [weakSelf reconnectDevice];
+    });
+}
+
+- (void)stopForceStartTimerFun
+{
+    if(forceStartTimer){
+        [forceStartTimer invalidate];
+        forceStartTimer = nil;
+    }
+}
+
 #pragma mark 盒子链接成功后需要处理的各种各样事情
 - (void)handlAllMsgAfterDidLinkFun
 {

+ 4 - 4
创维盒子/双子星云手机/CloudPlayer/View/PlayerView.m

@@ -95,8 +95,8 @@ ShowImageViewDelegate>{
         make.top.mas_equalTo(0.f);
     }];
     
-    UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(didTapBeganFun)];
-    [touchCommondView addGestureRecognizer:tap];
+//    UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(didTapBeganFun)];
+//    [touchCommondView addGestureRecognizer:tap];
     
     /*播放视图*/
     showImageView = [[ShowImageView alloc] init];
@@ -487,7 +487,7 @@ static CGRect startFrame;
     showImageView.isLan = isLan;
     touchCommondView.isLan = isLan;
     
-    [self setShowOrHideBottomButtonsFunBy:isLan];
+    //[self setShowOrHideBottomButtonsFunBy:isLan];
 }
 
 - (void)setShowOrHideBottomButtonsFunBy:(BOOL)isHide
@@ -514,7 +514,7 @@ static CGRect startFrame;
         [self setShowOrHideBottomButtonsFunBy:NO];
         
         [hideBottomTimer invalidate];
-        hideBottomTimer = [NSTimer scheduledTimerWithTimeInterval:3 target:self selector:@selector(timerToHideBottomButtonFun) userInfo:nil repeats:YES];
+        hideBottomTimer = [NSTimer scheduledTimerWithTimeInterval:3 target:self selector:@selector(timerToHideBottomButtonFun) userInfo:nil repeats:NO];
         [[NSRunLoop currentRunLoop] addTimer:hideBottomTimer forMode:NSRunLoopCommonModes];
     }
     else{

+ 7 - 0
创维盒子/双子星云手机/netWork/newWorkInterface.h

@@ -36,4 +36,11 @@
  返回数据模型 */
 #define updatePrivacyMode  @"/box/updatePrivacyMode"
 
+/*5 是否需要强制重启   POST请求
+输入参数     sn
+输入参数     isForceStart  是否强制重启
+ 
+ 返回数据模型 */
+#define updateForceStart  @"/box/updateForceStart"
+
 #endif /* newWorkInterface_h */

+ 1 - 0
创维盒子/双子星云手机/zh-Hans.lproj/Localizable.strings

@@ -236,6 +236,7 @@
 "player_Secret_key_copy_suc" = "密钥复制成功";
 "player_Secret_key_close" = "关闭";
 
+//1.1 新增
 "input_pwd_forget_pwd" = "忘记密码";
 "input_pwd_forget_secret_key" = "忘记秘钥";