소스 검색

1.切换设备优化

huangxiaodong 1 년 전
부모
커밋
23bb30a1c4

+ 1 - 0
创维盒子/双子星云手机/AppDelegate/PrefixHeader.pch

@@ -52,6 +52,7 @@
 #import "webSocketManager.h"
 
 #import "MJExtension.h"
+#import "RSATool.h"
 
 #define globalBlock(block) dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_LOW, 0), block)
 

+ 1 - 10
创维盒子/双子星云手机/Class/Controller/HWWebViewController.m

@@ -323,9 +323,7 @@
         NSString *SNStr = deviceDict[@"Const_Have_Add_Device_SN"];
         
         if(SNStr){
-//            [[connectDeviceManager shareInstance] getThridMsgBySN:SNStr needReconnect:NO didNetEnd:^(bool didSuc) {
-//
-//                if(didSuc){
+
                     NSString *curPwd = nil;
                     NSString*desPwdStr = nil;
                     
@@ -367,13 +365,6 @@
                     else if([text isEqualToString:keyToForgetPwd]){
                         [[NSNotificationCenter defaultCenter] postNotificationName:forgetPwdNotification object:nil];
                     }
-            
-//                }
-//                else{
-//
-//                }
-//
-//            }];
         }
     }
     

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

@@ -473,10 +473,7 @@
         NSString *SNStr = deviceDict[@"Const_Have_Add_Device_SN"];
         
         if(SNStr){
-//            [[connectDeviceManager shareInstance] getThridMsgBySN:SNStr needReconnect:NO  didNetEnd:^(bool didSuc) {
-//
-//                if(didSuc){
-                    
+
             NSString *curPwd = nil;
             NSString*desPwdStr = nil;
             
@@ -499,13 +496,6 @@
                     else{
                         [self verifyPwdWrongFun:NO];
                     }
-                    
-//                }
-//                else{
-//                    [self verifyPwdWrongFun:YES];
-//                }
-//                
-//            }];
         }
     }
     

+ 9 - 14
创维盒子/双子星云手机/Class/Set/ChangeDevice/QRCodeScanForChangeDeviceViewController.m

@@ -337,10 +337,9 @@ bool isDownType22 = YES;
         [self.layer removeFromSuperlayer];
         
 
-        [webSocketManager shareInstance].isChangeBoxType = YES;
         
         [self showNewIndicatorHaveStrWithCanBack:NO canTouch:NO showText:NSLocalizedString(@"guide_qrcoede_tips_ok",nil)];
-        [[connectDeviceManager shareInstance] getThridMsgBySN:resStr needReconnect:YES didNetEnd:^(NSInteger didSuc) {
+        [[connectDeviceManager shareInstance] getThridMsgBySN:resStr needReconnect:NO didNetEnd:^(NSInteger didSuc) {
             
             [self removeNewIndicatorHaveStr];
             
@@ -367,19 +366,15 @@ bool isDownType22 = YES;
                     [HWDataManager setBoolWithKey:stringKeyAddSn(Const_file_Transfe_working_background) value:YES];
                 }
                 
+                [webSocketManager shareInstance].isChangeBoxType = YES;
+                [[webSocketManager shareInstance].commandChannelManager rc_close];
+                [webSocketManager shareInstance].commandChannelManager = nil;
+            
                 //尝试修复偶现扫码切换云机 已经扫码到 要输新SN密码 但是云机显示是旧SN的 延时一秒跳转
-                HLog(@"hxdhxdhxdh 111")
-                
-                HLog(@"hxdhxdhxdh 222")
-                //[self.navigationController popToRootViewControllerAnimated:NO];
-                [[NSNotificationCenter defaultCenter] postNotificationName:GuideOkNotification object:nil];
-                
-//                dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
-//                    HLog(@"hxdhxdhxdh 222")
-//                    //[self.navigationController popToRootViewControllerAnimated:NO];
-//                    [[NSNotificationCenter defaultCenter] postNotificationName:GuideOkNotification object:nil];
-//                });
-                
+                dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+                    [[webSocketManager shareInstance] opencommandChannelManagerrc_openURL];
+                    [[NSNotificationCenter defaultCenter] postNotificationName:GuideOkNotification object:nil];
+                });
                 
                 
             }else{