Sfoglia il codice sorgente

1.验证秘钥功能--接口未联调

huangxiaodong 2 mesi fa
parent
commit
7f51032270

+ 14 - 2
创维盒子/双子星云手机.xcodeproj/project.pbxproj

@@ -179,6 +179,10 @@
 		6B0D004C2BFE104B00F02719 /* queryOneShareModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B0D00492BFE104B00F02719 /* queryOneShareModel.h */; };
 		6B0D004D2BFE104B00F02719 /* queryOneShareModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B0D00492BFE104B00F02719 /* queryOneShareModel.h */; };
 		6B0D004E2BFE104B00F02719 /* queryOneShareModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B0D004A2BFE104B00F02719 /* queryOneShareModel.m */; };
+		6B0EEF7B2EB881D4003DA3BF /* QRCodeInputSecretKeyView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B0EEF7A2EB881D4003DA3BF /* QRCodeInputSecretKeyView.m */; };
+		6B0EEF7C2EB881D4003DA3BF /* QRCodeInputSecretKeyView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B0EEF792EB881D4003DA3BF /* QRCodeInputSecretKeyView.h */; };
+		6B0EEF7D2EB881D4003DA3BF /* QRCodeInputSecretKeyView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B0EEF7A2EB881D4003DA3BF /* QRCodeInputSecretKeyView.m */; };
+		6B0EEF7E2EB881D4003DA3BF /* QRCodeInputSecretKeyView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B0EEF792EB881D4003DA3BF /* QRCodeInputSecretKeyView.h */; };
 		6B1CC2C62B677F3E00AD4217 /* extraMediaEventModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B1CC2C42B677F3D00AD4217 /* extraMediaEventModel.h */; };
 		6B1CC2C72B677F3E00AD4217 /* extraMediaEventModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B1CC2C52B677F3D00AD4217 /* extraMediaEventModel.m */; };
 		6B1CC2CA2B67A5FC00AD4217 /* USBInsertPopView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B1CC2C82B67A5FC00AD4217 /* USBInsertPopView.h */; };
@@ -1581,6 +1585,8 @@
 		6B0A75DE2C4CA3D300DCB32D /* audioPlayingView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = audioPlayingView.m; sourceTree = "<group>"; };
 		6B0D00492BFE104B00F02719 /* queryOneShareModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = queryOneShareModel.h; sourceTree = "<group>"; };
 		6B0D004A2BFE104B00F02719 /* queryOneShareModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = queryOneShareModel.m; sourceTree = "<group>"; };
+		6B0EEF792EB881D4003DA3BF /* QRCodeInputSecretKeyView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = QRCodeInputSecretKeyView.h; sourceTree = "<group>"; };
+		6B0EEF7A2EB881D4003DA3BF /* QRCodeInputSecretKeyView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = QRCodeInputSecretKeyView.m; sourceTree = "<group>"; };
 		6B1CC2C42B677F3D00AD4217 /* extraMediaEventModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = extraMediaEventModel.h; sourceTree = "<group>"; };
 		6B1CC2C52B677F3D00AD4217 /* extraMediaEventModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = extraMediaEventModel.m; sourceTree = "<group>"; };
 		6B1CC2C82B67A5FC00AD4217 /* USBInsertPopView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = USBInsertPopView.h; sourceTree = "<group>"; };
@@ -3467,6 +3473,8 @@
 				6BFF26902AF9D88200FCB4F7 /* AuthCodeTextField.m */,
 				6BFF26932AF9D8CC00FCB4F7 /* AuthCodeInputView.h */,
 				6BFF26942AF9D8CC00FCB4F7 /* AuthCodeInputView.m */,
+				6B0EEF792EB881D4003DA3BF /* QRCodeInputSecretKeyView.h */,
+				6B0EEF7A2EB881D4003DA3BF /* QRCodeInputSecretKeyView.m */,
 			);
 			path = AuthCodeView;
 			sourceTree = "<group>";
@@ -4059,6 +4067,7 @@
 				6B1FBD3E2B46875300926382 /* backupsFileRecordCell.h in Headers */,
 				6B7E04282C3E5A98004B4948 /* customDownloadCacheManager.h in Headers */,
 				6B2C1E8C2C070ADE00FDCF82 /* ZFPlayerGestureControl.h in Headers */,
+				6B0EEF7E2EB881D4003DA3BF /* QRCodeInputSecretKeyView.h in Headers */,
 				186820192AB94877005702A6 /* GuideLastView.h in Headers */,
 				6B6ABEEC2BFF5B2F00480BAC /* receiveSaveRecordTableView.h in Headers */,
 				6B5D86802C22EA5B008D25EA /* lastFileManager.h in Headers */,
@@ -4335,6 +4344,7 @@
 				6BD507002B9576A4006E7CB0 /* backupsFileRecordCell.h in Headers */,
 				6B7E04292C3E5A98004B4948 /* customDownloadCacheManager.h in Headers */,
 				6B2C1E8D2C070ADE00FDCF82 /* ZFPlayerGestureControl.h in Headers */,
+				6B0EEF7C2EB881D4003DA3BF /* QRCodeInputSecretKeyView.h in Headers */,
 				6BD507012B9576A4006E7CB0 /* GuideLastView.h in Headers */,
 				6B6ABEEE2BFF5B2F00480BAC /* receiveSaveRecordTableView.h in Headers */,
 				6B5D86812C22EA5B008D25EA /* lastFileManager.h in Headers */,
@@ -4636,6 +4646,7 @@
 				6B42A2262C41285C000555BB /* previewVideoPortraitTopMoreView.m in Sources */,
 				6B7EA7AD2BF72D3B002D5CC2 /* queryShareModel.m in Sources */,
 				6B8A5AE22C3BCC0E00E40B19 /* lastFileModel.m in Sources */,
+				6B0EEF7B2EB881D4003DA3BF /* QRCodeInputSecretKeyView.m in Sources */,
 				6B2C1E932C070ADE00FDCF82 /* ZFPlayerLogManager.m in Sources */,
 				6B679E012C255DC900D0DC03 /* MineCommonUsedView.m in Sources */,
 				6BD507172B9576A4006E7CB0 /* fileTransferPopView.m in Sources */,
@@ -4994,6 +5005,7 @@
 				6B42A2242C41285C000555BB /* previewVideoPortraitTopMoreView.m in Sources */,
 				6B7EA7AB2BF72D3B002D5CC2 /* queryShareModel.m in Sources */,
 				6B8A5AE12C3BCC0E00E40B19 /* lastFileModel.m in Sources */,
+				6B0EEF7D2EB881D4003DA3BF /* QRCodeInputSecretKeyView.m in Sources */,
 				6B2C1E922C070ADE00FDCF82 /* ZFPlayerLogManager.m in Sources */,
 				6B679DFF2C255DC900D0DC03 /* MineCommonUsedView.m in Sources */,
 				6B5B60612B3BC8DE009A2AE2 /* fileTransferPopView.m in Sources */,
@@ -5726,7 +5738,7 @@
 				CODE_SIGN_ENTITLEMENTS = "隐私保护.entitlements";
 				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 12;
+				CURRENT_PROJECT_VERSION = 1;
 				DEVELOPMENT_TEAM = 2D325655GC;
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",
@@ -5805,7 +5817,7 @@
 				CODE_SIGN_ENTITLEMENTS = "隐私保护.entitlements";
 				CODE_SIGN_IDENTITY = "Apple Development";
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 12;
+				CURRENT_PROJECT_VERSION = 1;
 				DEVELOPMENT_TEAM = 2D325655GC;
 				FRAMEWORK_SEARCH_PATHS = (
 					"$(inherited)",

+ 17 - 0
创维盒子/双子星云手机/Class/Guide/AuthCodeView/QRCodeInputSecretKeyView.h

@@ -0,0 +1,17 @@
+//
+//  QRCodeInputSecretKeyView.h
+//  双子星云手机
+//
+//  Created by xd h on 2025/11/3.
+//
+
+#import <UIKit/UIKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface QRCodeInputSecretKeyView : UIView
+@property (nonatomic,copy) void (^didClickCancelButton)(void);
+@property (nonatomic,copy) void (^didClickOKButton)(NSString *codeStr);
+@end
+
+NS_ASSUME_NONNULL_END

+ 213 - 0
创维盒子/双子星云手机/Class/Guide/AuthCodeView/QRCodeInputSecretKeyView.m

@@ -0,0 +1,213 @@
+//
+//  QRCodeInputSecretKeyView.m
+//  双子星云手机
+//
+//  Created by xd h on 2025/11/3.
+//
+
+#import "QRCodeInputSecretKeyView.h"
+
+@interface QRCodeInputSecretKeyView ()<UITextViewDelegate>
+{
+    UITextView *inputView;
+    UILabel *inputTipLab;
+}
+@end
+
+@implementation QRCodeInputSecretKeyView
+
+-(instancetype)initWithFrame:(CGRect)frame{
+    if(self = [super initWithFrame:frame])
+    {
+        [self createSubviews];
+
+    }
+    return self;
+}
+
+-(void)createSubviews
+{
+    UIView *backGround = [[UIView alloc]init];
+    backGround.backgroundColor = [UIColor colorWithHexString:@"#FFFFFF" alpha:0.3];
+    [self addSubview:backGround];
+    
+    
+    [backGround mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(0);
+        make.right.mas_equalTo(0);
+        make.top.mas_equalTo(0);
+        make.bottom.mas_equalTo(0);
+    }];
+    
+    UIView *whiteBackGround = [[UIView alloc]init];
+    whiteBackGround.backgroundColor = [UIColor colorWithHexString:@"#FFFFFF" alpha:1.0];
+    whiteBackGround.layer.cornerRadius = 8;
+    [self addSubview:whiteBackGround];
+
+    [whiteBackGround mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(40);
+        make.right.mas_equalTo(-40);
+        make.centerY.mas_equalTo(-60);
+        make.height.mas_equalTo(235);
+    }];
+    
+    //设备密钥
+    NSString *curTitle = NSLocalizedString(@"qrcode_secret_key_tip",nil);
+    UILabel *titleLab = [[UILabel alloc]init];
+    titleLab.text = curTitle;
+    titleLab.textColor = [UIColor hwColor:@"#333333" alpha:1.0];
+    titleLab.font = [UIFont systemFontOfSize:18];
+    titleLab.textAlignment = NSTextAlignmentCenter;
+    [whiteBackGround addSubview:titleLab];
+    [titleLab sizeToFit];
+    [titleLab mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(0);
+        make.right.mas_equalTo(0);
+        make.top.mas_equalTo(20);
+        make.height.mas_equalTo(30);
+    }];
+    
+    
+    //输入框 背景
+    UIView *inputBackGround = [[UIView alloc]init];
+    inputBackGround.backgroundColor = [UIColor colorWithHexString:@"#EEEEEE" alpha:1.0];
+    inputBackGround.layer.cornerRadius = 4;
+    [whiteBackGround addSubview:inputBackGround];
+
+    [inputBackGround mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.right.mas_equalTo(-15);
+        make.left.mas_equalTo(15);
+        make.top.equalTo(titleLab.mas_bottom).offset(20);
+        make.height.mas_equalTo(80);
+    }];
+    
+    
+    //请输入密钥
+    NSString *curinputTip = NSLocalizedString(@"qrcode_secret_key_input_tip",nil);
+    inputTipLab = [[UILabel alloc]init];
+    inputTipLab.text = curinputTip;
+    inputTipLab.textColor = [UIColor hwColor:@"#999999" alpha:1.0];
+    inputTipLab.font = [UIFont systemFontOfSize:16];
+    
+    
+    //输入框
+    inputView = [[UITextView alloc] init];
+    inputView.backgroundColor = [UIColor clearColor];
+    //inputView.layer.cornerRadius = 8;
+    inputView.textColor = [UIColor blackColor];
+    //inputView.textAlignment = NSTextAlignmentCenter;
+    inputView.font = [UIFont systemFontOfSize:16.0];
+    //inputView.placeholder = curinputTip;
+    inputView.delegate = self;
+    //inputView.keyboardType = UIKeyboardTypeNumberPad;
+    [inputBackGround addSubview:inputView];
+    [inputView setTintColor:[UIColor hwColor:@"#FF9500" alpha:1.0]];
+    
+    //inputView.text = @"0xa8d3cbfb5a7142630a928249616f7d13a71663cac05265849d8c45cbabd5a275";
+    
+    [inputView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.right.mas_equalTo(-10);
+        make.left.mas_equalTo(10);
+        make.top.mas_equalTo(5);
+        make.bottom.mas_equalTo(-5);
+    }];
+    
+    
+    [inputView addSubview:inputTipLab];
+    [inputTipLab mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(0);
+        make.right.mas_equalTo(0);
+        make.centerY.mas_equalTo(0);
+        make.height.mas_equalTo(20);
+    }];
+    
+    //取消按钮
+    UIButton* _leftCancleButton = [[UIButton alloc] init];
+    [_leftCancleButton setTitleColor:[UIColor hwColor:@"#0A132B" alpha:1.0] forState:UIControlStateNormal];
+    _leftCancleButton.titleLabel.font = [UIFont systemFontOfSize:16.0];
+    //_leftCancleButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
+    [_leftCancleButton addTarget:self action:@selector(didClickButtonFun:) forControlEvents:UIControlEventTouchUpInside];
+    _leftCancleButton.tag = 1;
+    _leftCancleButton.backgroundColor = [UIColor hwColor:@"#EEEEEE"];
+    _leftCancleButton.layer.cornerRadius = 8;
+    [_leftCancleButton setTitle:NSLocalizedString(@"other_cancel",nil) forState:UIControlStateNormal];
+    [whiteBackGround addSubview:_leftCancleButton];
+    
+    [_leftCancleButton mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.equalTo(inputBackGround.mas_left).offset(0);
+        make.right.equalTo(inputBackGround.mas_centerX).offset(-10);
+        make.height.mas_equalTo(40);
+        make.bottom.mas_equalTo(-30);
+    }];
+    
+    
+    //校验按钮
+    UIButton *_rightSelectAllButton = [[UIButton alloc] init];
+    [_rightSelectAllButton setTitleColor:[UIColor hwColor:@"#000000" alpha:1.0] forState:UIControlStateNormal];
+    _rightSelectAllButton.titleLabel.font = [UIFont systemFontOfSize:16.0];
+    //_leftCancleButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
+    [_rightSelectAllButton addTarget:self action:@selector(didClickButtonFun:) forControlEvents:UIControlEventTouchUpInside];
+    _rightSelectAllButton.tag = 2;
+    _rightSelectAllButton.backgroundColor = [UIColor hwColor:@"#FFD315"];
+    _rightSelectAllButton.layer.cornerRadius = 8;
+    [_rightSelectAllButton setTitle:NSLocalizedString(@"qrcode_secret_key_check_tip",nil) forState:UIControlStateNormal];
+    [whiteBackGround addSubview:_rightSelectAllButton];
+    
+    [_rightSelectAllButton mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.right.equalTo(inputBackGround.mas_right).offset(0);
+        make.left.equalTo(inputBackGround.mas_centerX).offset(10);
+        make.height.mas_equalTo(40);
+        make.bottom.mas_equalTo(-30);
+    }];
+}
+
+//- (void)textViewDidChange:(UITextView *)textView {
+//    if (textView.text.length > 0) {
+//        NSLog(@"有输入内容: %@", textView.text);
+//        // 执行有内容时的操作
+//        inputTipLab.hidden = YES;
+//    } else {
+//        NSLog(@"没有输入内容");
+//        // 执行无内容时的操作
+//        inputTipLab.hidden = NO;
+//    }
+//}
+
+- (void)textViewDidBeginEditing:(UITextView *)textView
+{
+    inputTipLab.hidden = YES;
+}
+
+- (void)textViewDidEndEditing:(UITextView *)textView
+{
+    if (textView.text.length > 0) {
+        NSLog(@"有输入内容: %@", textView.text);
+        // 执行有内容时的操作
+        inputTipLab.hidden = YES;
+    } else {
+        NSLog(@"没有输入内容");
+        // 执行无内容时的操作
+        inputTipLab.hidden = NO;
+    }
+}
+
+#pragma mark 按钮点击时间
+- (void)didClickButtonFun:(UIButton*)but
+{
+    NSInteger tag = but.tag;
+    
+    if (tag == 1) {
+        if (_didClickCancelButton) {
+            _didClickCancelButton();
+        }
+    }
+    else if (tag == 2) {
+        NSString *codeStr = [inputView.text stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];
+        if (codeStr.length > 0) {
+            if (_didClickOKButton) {
+                _didClickOKButton(codeStr);
+            }
+        }
+    }
+}
+@end

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

@@ -12,9 +12,12 @@
 #import "RSATool.h"
 #import <TZImageManager.h>
 #import <TZImagePickerController.h>
+#import "QRCodeInputSecretKeyView.h"
 
 @interface QRCodeScanViewController ()<AVCaptureMetadataOutputObjectsDelegate,AVCaptureVideoDataOutputSampleBufferDelegate,UINavigationControllerDelegate,UIImagePickerControllerDelegate,TZImagePickerControllerDelegate>
-
+{
+    NSString *curScanCode;//当前扫码出来的二维码
+}
 @property(nonatomic,strong)AVCaptureVideoPreviewLayer *layer;
 
 //捕捉会话
@@ -287,7 +290,7 @@ bool isDownType = YES;
 //         )
     {
         
-        [[iToast makeText:NSLocalizedString(@"guide_qrcoede_tips_ok",nil)] show];
+        //[[iToast makeText:NSLocalizedString(@"guide_qrcoede_tips_ok",nil)] show];
         [_scanLineTimer  invalidate];
         
 //        NSDictionary *newDict = [[NSDictionary alloc] initWithObjectsAndKeys:resStr,Const_Have_Add_Device_SN, nil];
@@ -310,48 +313,169 @@ bool isDownType = YES;
 
 - (void)nextStep:(NSString *)sn{
     
+    //新需求
+    curScanCode = sn;
+    [self inputSecretKeyFun];
+    return;
+    
+    
+//    KWeakSelf
+//    
+//    [[netWorkManager shareInstance] getThridMsgBySN:sn success:^(id  _Nonnull responseObject) {
+//        DeviceThirdIdModel *model = responseObject;
+//        if([model isKindOfClass:[DeviceThirdIdModel class]]){
+//          
+//            if(model.status == 0 && model.data){
+//                [weakSelf gotoGuideViewFunBy:sn];
+//            }
+//            else{
+//                NSInteger state = 2;
+//                if (model.status == 201 || model.status == 202) {
+//                    state = model.status;
+//                }
+//                
+//                if(self->_didScanErrorFun){
+//                    self->_didScanErrorFun(state);
+//                }
+//                dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+//                    [self.navigationController popViewControllerAnimated:YES];
+//                });
+//            }
+//        }
+//        else{
+//            if(self->_didScanErrorFun){
+//                self->_didScanErrorFun(2);
+//            }
+//            dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+//                [self.navigationController popViewControllerAnimated:YES];
+//            });
+//        }
+//        
+//    } failure:^(NSError * _Nonnull error) {
+//        if(self->_didScanErrorFun){
+//            self->_didScanErrorFun(0);
+//        }
+//        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+//            [self.navigationController popViewControllerAnimated:YES];
+//        });
+//    }];
+}
+
+#pragma mark 需要用户输入秘钥
+- (void)inputSecretKeyFun
+{
+    QRCodeInputSecretKeyView *view = [[QRCodeInputSecretKeyView alloc] init];
+    [self.view addSubview:view];
+    
+    [view mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(0);
+        make.right.mas_equalTo(0);
+        make.top.mas_equalTo(0);
+        make.bottom.mas_equalTo(0);
+    }];
+    
     KWeakSelf
+    view.didClickCancelButton = ^{
+        [weakSelf backBtnPressed];
+    };
     
-    [[netWorkManager shareInstance] getThridMsgBySN:sn success:^(id  _Nonnull responseObject) {
-        DeviceThirdIdModel *model = responseObject;
-        if([model isKindOfClass:[DeviceThirdIdModel class]]){
-          
-            if(model.status == 0 && model.data){
-                [weakSelf gotoGuideViewFunBy:sn];
-            }
-            else{
-                NSInteger state = 2;
-                if (model.status == 201 || model.status == 202) {
-                    state = model.status;
-                }
-                
-                if(self->_didScanErrorFun){
-                    self->_didScanErrorFun(state);
-                }
-                dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
-                    [self.navigationController popViewControllerAnimated:YES];
-                });
+    view.didClickOKButton = ^(NSString * _Nonnull codeStr) {
+        [weakSelf checkNewCodeAndSnBy:codeStr];
+    };
+}
+
+#pragma mark 新验证接口
+- (void)checkNewCodeAndSnBy:(NSString*)codeStr
+{
+    NSMutableDictionary *paraDict = [NSMutableDictionary new];
+    if (curScanCode) {
+        [paraDict setValue:curScanCode forKey:@"sn"];
+    }
+    if (codeStr) {
+        [paraDict setValue:codeStr forKey:@"hash"];
+    }
+    
+    KWeakSelf
+    [[netWorkManager shareInstance] CommonGetWithCallBackCode:getClientInfoByHash Parameters:paraDict success:^(id  _Nonnull responseObject) {
+        
+        DeviceThirdIdModel *model = [[DeviceThirdIdModel alloc] initWithDictionary:responseObject error:nil];
+
+        if(model.status == 0
+           && model.data)
+        {//根据SN 获取到正确的信息
+            ksharedAppDelegate.DeviceThirdIdMod = model;
+            
+            NSString*desPwdstr = [RSATool AES128Decrypt:model.data.password key:AESCODEKEEYY];
+            
+            /*密码保持在本地*/
+            NSDictionary *deviceDict = [HWDataManager getObjectWithKey:Const_Have_Add_Device];
+            NSMutableDictionary *dict = [[NSMutableDictionary alloc] initWithDictionary:deviceDict];
+            [dict setObject:desPwdstr forKey:Const_Have_Add_Device_PWD];
+           
+            NSString *sdnid = model.data.sdnId;
+            
+            if(sdnid){
+                [dict setObject:sdnid forKey:Const_Have_Add_Device_sdnid];
             }
+            
+            [HWDataManager setObjectWithKey:Const_Have_Add_Device_Privacy_Mode value:[NSNumber numberWithBool:model.data.isPrivacyMode]];
+            
+            [HWDataManager setObjectWithKey:Const_Have_Add_Device value:dict];
         }
         else{
-            if(self->_didScanErrorFun){
-                self->_didScanErrorFun(2);
-            }
-            dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
-                [self.navigationController popViewControllerAnimated:YES];
-            });
+            
         }
         
+        
     } failure:^(NSError * _Nonnull error) {
-        if(self->_didScanErrorFun){
-            self->_didScanErrorFun(0);
-        }
-        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
-            [self.navigationController popViewControllerAnimated:YES];
-        });
+        HLog("网络报错");
+        
     }];
 }
 
+//{
+//    KWeakSelf
+//
+//    [[netWorkManager shareInstance] getThridMsgBySN:sn success:^(id  _Nonnull responseObject) {
+//        DeviceThirdIdModel *model = responseObject;
+//        if([model isKindOfClass:[DeviceThirdIdModel class]]){
+//
+//            if(model.status == 0 && model.data){
+//                [weakSelf gotoGuideViewFunBy:sn];
+//            }
+//            else{
+//                NSInteger state = 2;
+//                if (model.status == 201 || model.status == 202) {
+//                    state = model.status;
+//                }
+//
+//                if(self->_didScanErrorFun){
+//                    self->_didScanErrorFun(state);
+//                }
+//                dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+//                    [self.navigationController popViewControllerAnimated:YES];
+//                });
+//            }
+//        }
+//        else{
+//            if(self->_didScanErrorFun){
+//                self->_didScanErrorFun(2);
+//            }
+//            dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+//                [self.navigationController popViewControllerAnimated:YES];
+//            });
+//        }
+//
+//    } failure:^(NSError * _Nonnull error) {
+//        if(self->_didScanErrorFun){
+//            self->_didScanErrorFun(0);
+//        }
+//        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+//            [self.navigationController popViewControllerAnimated:YES];
+//        });
+//    }];
+//}
+
 #pragma mark GuideViewController
 
 - (void)gotoGuideViewFunBy:(NSString*)sn

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

@@ -646,3 +646,9 @@
 "common_copy_sn" = "Copy SN";
 "cloudPhone_system_state_close_title" = "The cloud system has been shut down";
 "cloudPhone_system_state_close_tip" = "Please go to the GBOX app settings feature on your handheld game console to enable the cloud phone system";
+
+
+//GBOX 1.0.1
+"qrcode_secret_key_tip"   = "device key";
+"qrcode_secret_key_input_tip"   = "Please enter the key";
+"qrcode_secret_key_check_tip"   = "verify";

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

@@ -154,4 +154,12 @@
  
  返回数据模型 */
 #define webrctLogAdd  @"/box/webrtc/log/add"
+
+/*23 根据盒子SN号获取对应信息 新  get请求
+输入参数     sn  贴在盒子上的sn好
+ 输入参数     hash  用户找商家获取
+ 
+ 返回数据模型 */
+#define getClientInfoByHash  @"/box/getClientInfoByHash"
+
 #endif /* newWorkInterface_h */

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

@@ -640,3 +640,9 @@
 "common_copy_sn" = "复制SN";
 "cloudPhone_system_state_close_title" = "云机系统已关闭";
 "cloudPhone_system_state_close_tip" = "请到掌上游戏机【GBOX应用-设置】功能开启云手机系统";
+
+//GBOX 1.0.1
+"qrcode_secret_key_tip"   = "设备密钥";
+"qrcode_secret_key_input_tip"   = "请输入密钥";
+"qrcode_secret_key_check_tip"   = "校验";
+

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

@@ -646,3 +646,8 @@
 "common_copy_sn" = "複製SN";
 "cloudPhone_system_state_close_title" = "雲機系統已關閉";
 "cloudPhone_system_state_close_tip" = "請到掌上遊戲機【GBOX應用-設定】功能開啟雲手機系統";
+
+//GBOX 1.0.1
+"qrcode_secret_key_tip"   = "設備金鑰";
+"qrcode_secret_key_input_tip"   = "請輸入金鑰";
+"qrcode_secret_key_check_tip"   = "校驗";