huangxiaodong 1 год назад
Родитель
Сommit
27def53a15

+ 17 - 1
创维盒子/双子星云手机/AppDelegate/SceneDelegate.m

@@ -134,6 +134,7 @@
     KWeakSelf
     //有设备了先去做链接准备  // 80bec9c5
     NSString *SNStr = deviceDict[@"Const_Have_Add_Device_SN"];
+    //SNStr = @"0333933700222490012925";
     NSString *sdnId = [connectDeviceManager shareInstance].DeviceThirdIdMod.data.sdnId;
     if(SNStr && !sdnId){
         [[connectDeviceManager shareInstance] getThridMsgBySN:SNStr needReconnect:YES didNetEnd:^(NSInteger didSuc) {
@@ -142,10 +143,17 @@
                 dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
                     mainBlock(^{
                         [weakSelf showNetErrorAlertFun];
+                        [weakSelf enterMainVCFromSceneSecondStepFun];
                     });
                 });
             }
-            [weakSelf enterMainVCFromSceneSecondStepFun];
+            else if(didSuc == 2){
+                [weakSelf gotoScanAginByThridMsgErrorFun];
+            }
+            else{
+                [weakSelf enterMainVCFromSceneSecondStepFun];
+            }
+            
         }];
     }
     else{
@@ -752,4 +760,12 @@
      }];
 }
 
+- (void)gotoScanAginByThridMsgErrorFun
+{
+    /*扫码界面*/
+    TipsQRCodeViewController *qrCodeVC = [[TipsQRCodeViewController alloc] init];
+    qrCodeVC.isNeedToShowAleatType = YES;
+    BaseNavigationController *qrCodeVCNav = [[BaseNavigationController alloc] initWithRootViewController:qrCodeVC];
+    self.window.rootViewController = qrCodeVCNav;
+}
 @end

+ 8 - 2
创维盒子/双子星云手机/Class/Guide/QRCodeScanViewController.m

@@ -299,10 +299,16 @@ bool isDownType = YES;
     
     KWeakSelf
     [[connectDeviceManager shareInstance] getThridMsgBySN:sn needReconnect:NO didNetEnd:^(NSInteger didSuc) {
-        if(didSuc){
+        if(didSuc == 1){
             [weakSelf gotoGuideViewFunBy:sn];
         }else{
-            [[iToast makeText:NSLocalizedString(@"guide_qrcoede_tips_get_SdnID_fail",nil)] show];
+            if(didSuc == 2){
+                [[iToast makeText:NSLocalizedString(@"scan_sn_data_error_tip",nil)] show];
+            }
+            else{
+                [[iToast makeText:NSLocalizedString(@"guide_qrcoede_tips_get_SdnID_fail",nil)] show];
+            }
+            
             dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
                 [self.navigationController popViewControllerAnimated:YES];
             });

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

@@ -310,7 +310,7 @@ bool isDownType22 = YES;
             
             [self removeNewIndicatorHaveStr];
             
-            if(didSuc){
+            if(didSuc == 1){
                 
                 NSMutableDictionary *dict = [[NSMutableDictionary alloc] initWithDictionary:deviceDict];
                 [dict setObject:resStr forKey:Const_Have_Add_Device_SN];
@@ -319,7 +319,14 @@ bool isDownType22 = YES;
                 [self.navigationController popToRootViewControllerAnimated:NO];
                 [[NSNotificationCenter defaultCenter] postNotificationName:GuideOkNotification object:nil];
             }else{
-                [[iToast makeText:NSLocalizedString(@"guide_qrcoede_tips_get_SdnID_fail",nil)] show];
+                
+                if(didSuc == 2){
+                    [[iToast makeText:NSLocalizedString(@"scan_sn_data_error_tip",nil)] show];
+                }
+                else{
+                    [[iToast makeText:NSLocalizedString(@"guide_qrcoede_tips_get_SdnID_fail",nil)] show];
+                }
+                
                 
                 dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
                     mainBlock(^{