Browse Source

1.同步1.2.7 兼容新SN后扫码无信息问题

huangxiaodong 1 year ago
parent
commit
e4f22af02c

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

@@ -164,6 +164,9 @@
                     });
                 });
             }
+            else if(didSuc == 2){
+                [weakSelf gotoScanAginByThridMsgErrorFun];
+            }
             else{
                 [weakSelf enterMainVCFromSceneSecondStepFun];
             }
@@ -831,4 +834,12 @@
     
 }
 
+- (void)gotoScanAginByThridMsgErrorFun
+{
+    /*扫码界面*/
+    TipsQRCodeViewController *qrCodeVC = [[TipsQRCodeViewController alloc] init];
+    qrCodeVC.isNeedToShowAleatType = YES;
+    BaseNavigationController *qrCodeVCNav = [[BaseNavigationController alloc] initWithRootViewController:qrCodeVC];
+    self.window.rootViewController = qrCodeVCNav;
+}
 @end

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

@@ -155,7 +155,7 @@
 // 调用接口验证验证码正确性
 -(void)checkAuthcode
 {
-    NSString *snStr = [connectDeviceManager shareInstance].DeviceThirdIdMod.data.sn;
+    NSString *snStr = [connectDeviceManager shareInstance].DeviceThirdIdMod.data.changeSn;
     NSString *secretkey  = [RSATool sha256_8:snStr];
     
     NSString*inputCodeStr = [self.codeStr uppercaseString];

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

@@ -316,10 +316,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];
             });

+ 1 - 1
创维盒子/双子星云手机/Class/Guide/TipsQRCodeViewController.h

@@ -10,7 +10,7 @@
 NS_ASSUME_NONNULL_BEGIN
 
 @interface TipsQRCodeViewController : BaseViewController
-
+@property(nonatomic,assign)BOOL isNeedToShowAleatType;
 @end
 
 NS_ASSUME_NONNULL_END

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

@@ -9,7 +9,7 @@
 #import <Masonry.h>
 #import "UIView+View.h"
 #import "QRCodeScanViewController.h"
-
+#import "ComontAlretViewController.h"
 @interface TipsQRCodeViewController ()
 
 @end
@@ -210,4 +210,36 @@
 }
 */
 
+- (void)viewDidAppear:(BOOL)animated
+{
+    [super viewDidAppear:animated];
+    if(_isNeedToShowAleatType){
+        [self showAlertFun];
+    }
+}
+
+- (void)showAlertFun
+{
+    
+    
+    NSString *linkErrTip = NSLocalizedString(@"scan_sn_data_error_tip",nil);
+    
+    ComontAlretViewController *linkFailAlretVC= [[ComontAlretViewController alloc] initWithTiTle:nil
+                                                                                      msg:linkErrTip
+                                                                                 imageStr:nil
+                                                                              cancelTitle:NSLocalizedString(@"guide_set_pwd_guide_know",nil)
+                                                                                  okTitle:nil isOkBtnHighlight:NO
+                                                                               didClickOk:^{
+        
+        
+     } didClickCancel:^{
+         
+     }];
+    
+     linkFailAlretVC.modalPresentationStyle = UIModalPresentationCustom;
+     
+     [self presentViewController:linkFailAlretVC animated:YES completion:^{
+         linkFailAlretVC.view.superview.backgroundColor = [UIColor clearColor];
+     }];
+}
 @end

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

@@ -331,7 +331,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];
@@ -340,7 +340,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(^{

+ 1 - 1
创维盒子/双子星云手机/Class/Set/MySetViewController.m

@@ -751,7 +751,7 @@
 {
     KWeakSelf
     //瑞云发起重连
-    NSString *snStr = [connectDeviceManager shareInstance].DeviceThirdIdMod.data.sn;
+    NSString *snStr = [connectDeviceManager shareInstance].DeviceThirdIdMod.data.changeSn;
     if(snStr){
         [[connectDeviceManager shareInstance] getThridMsgBySN:snStr needReconnect:YES didNetEnd:^(NSInteger didSuc) {
             if(didSuc){

+ 1 - 1
创维盒子/双子星云手机/Class/Set/privacyMode/privacyModeTipViewController.m

@@ -164,7 +164,7 @@
     [self showNewIndicatorWithCanBack:YES canTouch:NO];
 
     BOOL haveOpenMask = YES;
-    NSString* curSn = [connectDeviceManager shareInstance].DeviceThirdIdMod.data.sn;
+    NSString* curSn = [connectDeviceManager shareInstance].DeviceThirdIdMod.data.changeSn;
     
     NSMutableDictionary *paraDict = [NSMutableDictionary dictionary];
     [paraDict setValue:curSn forKey:@"sn"];

+ 1 - 1
创维盒子/双子星云手机/Class/Set/privacyMode/privacyModeViewController.m

@@ -321,7 +321,7 @@
     [self showNewIndicatorWithCanBack:YES canTouch:NO];
 
     BOOL haveOpenMask = [connectDeviceManager shareInstance].DeviceThirdIdMod.data.isPrivacyMode;
-    NSString* curSn = [connectDeviceManager shareInstance].DeviceThirdIdMod.data.sn;
+    NSString* curSn = [connectDeviceManager shareInstance].DeviceThirdIdMod.data.changeSn;
     
     NSMutableDictionary *paraDict = [NSMutableDictionary dictionary];
     [paraDict setValue:curSn forKey:@"sn"];

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

@@ -95,7 +95,7 @@
 - (void)updateForceStartFun{
     
     
-    NSString* curSn = [connectDeviceManager shareInstance].DeviceThirdIdMod.data.sn;
+    NSString* curSn = [connectDeviceManager shareInstance].DeviceThirdIdMod.data.changeSn;
     
     NSMutableDictionary *paraDict = [NSMutableDictionary dictionary];
     [paraDict setValue:curSn forKey:@"sn"];

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

@@ -2265,7 +2265,7 @@ NSDate *lastVideoTome;/*上一帧数据时间*/
     if([[connectDeviceManager shareInstance] curConnectDeviceState] <= 3)
     {
         //瑞云发起重连
-        NSString *snStr = [connectDeviceManager shareInstance].DeviceThirdIdMod.data.sn;
+        NSString *snStr = [connectDeviceManager shareInstance].DeviceThirdIdMod.data.changeSn;
         if(snStr){
             //_checkThridConnectNum = 1;
             [[connectDeviceManager shareInstance] getThridMsgBySN:snStr needReconnect:YES didNetEnd:^(NSInteger didSuc) {

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

@@ -87,7 +87,7 @@
     [grayBgView addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(copyKeyFun)]];
     
     
-    NSString *snStr = [connectDeviceManager shareInstance].DeviceThirdIdMod.data.sn;
+    NSString *snStr = [connectDeviceManager shareInstance].DeviceThirdIdMod.data.changeSn;
     NSString *secretkey  = [RSATool sha256_8:snStr];
 
     UILabel *secretKeyLab = [[UILabel alloc] init];
@@ -195,7 +195,7 @@
 #pragma mark 复制
 - (void)copyKeyFun
 {
-    NSString *snStr = [connectDeviceManager shareInstance].DeviceThirdIdMod.data.sn;
+    NSString *snStr = [connectDeviceManager shareInstance].DeviceThirdIdMod.data.changeSn;
     NSString *secretkey  = [RSATool sha256_8:snStr];
     
     UIPasteboard * Pasteboard = [UIPasteboard generalPasteboard];

+ 2 - 0
创维盒子/双子星云手机/connectDeviceManager/model/DeviceThirdIdModel.h

@@ -23,6 +23,8 @@ NS_ASSUME_NONNULL_BEGIN
 
 /**sn*/
 @property (nonatomic,copy) NSString *sn; //
+/**changeSn*/
+@property (nonatomic,copy) NSString *changeSn; //
 /***/
 @property (nonatomic,copy) NSString *firstTimeUpdatePassword; //
 /***/

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

@@ -397,3 +397,4 @@
 "File_creat_def_path_error_tip"   = "Unable to create system default path";
 "netWork_error_tip_title" = "No network";
 "netWork_error_tip_content" = "iphone network abnormality, please check the current network permissions, or drag to the bottom of the settings to find Private-x and enter to view wireless data permissions";
+"scan_sn_data_error_tip"   = "Device info not found. Scan to bind a new one.";

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

@@ -396,3 +396,4 @@
 "File_creat_def_path_error_tip"   = "システムのデフォルトパスを作成できません";
 "netWork_error_tip_title" = "ネットワークなし";
 "netWork_error_tip_content" = "携帯電話のネットワークに異常がある場合は、現在のネットワーク権限を確認するか、設定の下にPrivate-xを見つけてワイヤレスデータを表示する権限を確認してください";
+"scan_sn_data_error_tip"   = "デバイス情報未確認。新デバイスをスキャンして繋ぐる。";

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

@@ -396,3 +396,4 @@
 "File_creat_def_path_error_tip"   = "不可创建操作系统默认路径";
 "netWork_error_tip_title" = "无网络";
 "netWork_error_tip_content" = "手机网络异常,请检查当前网络权限,或者在设置里拉到底部找到Private-x进入查看无线数据权限";
+"scan_sn_data_error_tip"   = "设备信息不存在,请扫码绑定新设备";

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

@@ -396,3 +396,4 @@
 "File_creat_def_path_error_tip"   = "不可建立作業系統預設路徑";
 "netWork_error_tip_title" = "無網絡";
 "netWork_error_tip_content" = "手機網絡异常,請檢查當前網絡許可權,或者在設定里拉到底部找到Private-x進入查看無線數據許可權";
+"scan_sn_data_error_tip"   = "設備資訊不存在,請掃碼綁定新設備";