Browse Source

1.审核登录页和扫码页

huangxiaodong 5 months ago
parent
commit
0b10055f89

+ 3 - 1
创维盒子/code/AppDelegate/SceneDelegate.m

@@ -63,6 +63,7 @@
 #import "imageVersionUpdateDoneView.h"
 #import "imageVersionUpdateFailView.h"
 #import "privacyModeTipViewController.h"
+#import "LoginType1ViewController.h"
 
 @interface SceneDelegate ()<SetUsePWDViewControllerDelegate,GuideViewControllerDelegate,UITabBarControllerDelegate>
 {
@@ -179,7 +180,8 @@
         [HWDataManager setBoolWithKey:Const_last_file_show value:YES];
         
         /*扫码界面*/
-        TipsQRCodeViewController *qrCodeVC = [[TipsQRCodeViewController alloc] init];
+        //TipsQRCodeViewController *qrCodeVC = [[TipsQRCodeViewController alloc] init];
+        LoginType1ViewController *qrCodeVC = [[LoginType1ViewController alloc] init];
         BaseNavigationController *qrCodeVCNav = [[BaseNavigationController alloc] initWithRootViewController:qrCodeVC];
         self.window.rootViewController = qrCodeVCNav;
         

+ 22 - 0
创维盒子/code/Assets.xcassets/Login/login_scan.imageset/Contents.json

@@ -0,0 +1,22 @@
+{
+  "images" : [
+    {
+      "idiom" : "universal",
+      "scale" : "1x"
+    },
+    {
+      "filename" : "login_scan@2x.png",
+      "idiom" : "universal",
+      "scale" : "2x"
+    },
+    {
+      "filename" : "login_scan@3x.png",
+      "idiom" : "universal",
+      "scale" : "3x"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
创维盒子/code/Assets.xcassets/Login/login_scan.imageset/login_scan@2x.png


BIN
创维盒子/code/Assets.xcassets/Login/login_scan.imageset/login_scan@3x.png


+ 16 - 0
创维盒子/code/Class/Guide/LoginType1ViewController.h

@@ -0,0 +1,16 @@
+//
+//  LoginType1ViewController.h
+//  Private-X
+//
+//  Created by xd h on 2025/1/16.
+//
+
+#import "BaseViewController.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface LoginType1ViewController : BaseViewController
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 497 - 0
创维盒子/code/Class/Guide/LoginType1ViewController.m

@@ -0,0 +1,497 @@
+//
+//  LoginType1ViewController.m
+//  Private-x
+//
+//  Created by xd h on 2025/1/16.
+//
+
+#import "LoginType1ViewController.h"
+#import "ScanToLoginViewController.h"
+#import "GuideViewController.h"
+#import "IQKeyboardManager.h"
+#import "CustomerWebViewController.h"
+
+@interface LoginType1ViewController ()<UITextViewDelegate,UITextFieldDelegate>
+@property(nonatomic,strong) UITextField *accountTF;
+@property(nonatomic,strong) UIButton *scanBut;
+@property(nonatomic,strong) UIButton *loginOkBut;
+@property(nonatomic,strong) UIButton *protocolSelectBut;//协议按钮
+@property(nonatomic,strong) CAGradientLayer *gradientLayer;
+@end
+
+@implementation LoginType1ViewController
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    // Do any additional setup after loading the view.
+    
+    [self drawAnyView];
+    
+    [self setupKeyboardManager];
+}
+
+- (void)viewWillAppear:(BOOL)animated
+{
+    [super viewWillAppear:animated];
+    IQKeyboardManager *keyboardManager = [IQKeyboardManager sharedManager];
+    keyboardManager.enable = YES;
+}
+
+- (void)viewWillDisappear:(BOOL)animated
+{
+    [super viewWillDisappear:animated];
+    IQKeyboardManager *keyboardManager = [IQKeyboardManager sharedManager];
+    keyboardManager.enable = NO;
+}
+
+- (void)setupKeyboardManager {
+    IQKeyboardManager *keyboardManager = [IQKeyboardManager sharedManager];
+    keyboardManager.enable = YES;
+    keyboardManager.shouldResignOnTouchOutside = YES;
+    keyboardManager.shouldShowToolbarPlaceholder = NO;
+    keyboardManager.enableAutoToolbar = NO;
+}
+
+- (void)drawAnyView{
+    [self.navigationBar setHidden:YES];
+    [self.toolBar setHidden:YES];
+    
+    [self initBaseUIFun];
+}
+
+- (void)initBaseUIFun
+{
+    self.view.backgroundColor = [UIColor whiteColor];
+    
+    UIImageView *logoImageV = [UIImageView new];
+    logoImageV.image = [UIImage imageNamed:@"PrivateX_icon"];
+    [self.view addSubview:logoImageV];
+    
+    [logoImageV mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.width.mas_equalTo(64);
+        make.height.mas_equalTo(64);
+        make.centerX.mas_equalTo(0);
+        make.top.mas_equalTo(180);
+    }];
+    
+    //背景
+    UIView *bgView = [UIView new];
+    bgView.backgroundColor = [UIColor hwColor:@"#F5F7FA"];
+    bgView.layer.cornerRadius = 8;
+    [self.view addSubview:bgView];
+    
+    [bgView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(20);
+        make.right.mas_equalTo(-20);
+        make.height.mas_equalTo(50);
+        make.top.equalTo(logoImageV.mas_bottom).offset(80);
+    }];
+    
+    NSString *curTitle = NSLocalizedString(@"input_your_account",nil);
+//    UILabel *tipLabel = [[UILabel alloc] init];
+//    tipLabel.text = curTitle;
+//    tipLabel.textColor = [UIColor hwColor:@"#999999"];
+//    tipLabel.font = [UIFont systemFontOfSize:14.0];
+//    [bgView addSubview:tipLabel];
+//    
+//    [tipLabel mas_makeConstraints:^(MASConstraintMaker *make) {
+//        make.left.mas_equalTo(15);
+//        make.height.mas_equalTo(30);
+//        make.centerY.mas_equalTo(0);
+//    }];
+    
+    _scanBut = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 50, 50)];
+    [_scanBut setImage:[UIImage imageNamed:@"login_scan"] forState:UIControlStateNormal];
+    [_scanBut addTarget:self action:@selector(didClickScanButtonFun:) forControlEvents:UIControlEventTouchUpInside];
+    [bgView addSubview:_scanBut];
+    //scanBut.backgroundColor = [UIColor greenColor];
+    
+//    [scanBut mas_makeConstraints:^(MASConstraintMaker *make) {
+//        make.right.mas_equalTo(0);
+//        make.width.mas_equalTo(50);
+//        make.height.mas_equalTo(50);
+//        make.top.mas_equalTo(0);
+//    }];
+    
+    _accountTF = [[UITextField alloc] init];
+    _accountTF.placeholder = curTitle;
+    _accountTF.textColor = [UIColor blackColor];
+    _accountTF.font = [UIFont systemFontOfSize:14];
+    _accountTF.delegate = self;
+    _accountTF.keyboardType = UIKeyboardTypeASCIICapable;//UIKeyboardTypeNamePhonePad;
+    _accountTF.rightView = _scanBut;
+    _accountTF.rightViewMode = UITextFieldViewModeAlways;
+    [bgView addSubview:_accountTF];
+    
+    [_accountTF mas_makeConstraints:^(MASConstraintMaker *make) {
+//        make.left.equalTo(tipLabel.mas_right).offset(5);
+//        make.right.equalTo(scanBut.mas_left).offset(0);
+        make.left.mas_equalTo(15);
+        make.right.mas_equalTo(-15);
+        make.height.mas_equalTo(50);
+        make.top.mas_equalTo(0);
+    }];
+    
+    _loginOkBut = [[UIButton alloc] init];
+    
+    _gradientLayer = [CAGradientLayer layer];
+    _gradientLayer.frame = CGRectMake(0, 0, (SCREEN_W - 20*2), 50);
+    _gradientLayer.colors = @[(__bridge NSString *)[UIColor hwColor:@"#0CDEFD" alpha:0.5].CGColor, (__bridge NSString *)[UIColor hwColor:@"#058DFB" alpha:0.5].CGColor];
+    _gradientLayer.locations = @[@(0), @(1.0f)];
+    _gradientLayer.startPoint = CGPointMake(0, 0.5);
+    _gradientLayer.endPoint = CGPointMake(0.97, 0.5);
+    [_loginOkBut.layer addSublayer:_gradientLayer];
+    
+    [_loginOkBut setTitle:NSLocalizedString(@"login_type1_but_title",nil) forState:UIControlStateNormal];
+    _loginOkBut.titleLabel.font = [UIFont systemFontOfSize:16.0];
+    [_loginOkBut setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
+    _loginOkBut.layer.cornerRadius = 8;
+    _loginOkBut.layer.masksToBounds = YES;
+    _loginOkBut.enabled = NO;
+    _loginOkBut.tag = 1;
+    [_loginOkBut addTarget:self action:@selector(didClickButtonFun:) forControlEvents:UIControlEventTouchUpInside];
+    [self.view  addSubview:_loginOkBut];
+    
+    
+    [_loginOkBut mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.height.mas_equalTo(50);
+        make.left.mas_equalTo(20);
+        make.right.mas_equalTo(-20);
+        make.top.mas_equalTo(bgView.mas_bottom).offset(42);
+    }];
+    
+    //协议
+    _protocolSelectBut = [[UIButton alloc] init];
+    [_protocolSelectBut setImage:[UIImage imageNamed:@"common_un_check_24"] forState:UIControlStateNormal];
+    [_protocolSelectBut setImage:[UIImage imageNamed:@"common_did_check_24"] forState:UIControlStateSelected];
+    [_protocolSelectBut addTarget:self action:@selector(didClickProtocolButtonFun:) forControlEvents:UIControlEventTouchUpInside];
+    [self.view addSubview:_protocolSelectBut];
+    
+    [_protocolSelectBut mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(20);
+        make.width.mas_equalTo(30);
+        make.height.mas_equalTo(30);
+        make.top.equalTo(_loginOkBut.mas_bottom).offset(15);
+    }];
+    
+    UITextView *contentTV = [[UITextView alloc] init];
+    contentTV.backgroundColor = [UIColor whiteColor];
+    contentTV.textColor = [UIColor hwColor:@"#999999"];
+    contentTV.delegate = self;
+    contentTV.editable = YES;        //必须禁止输入,否则点击将弹出输入键盘
+    contentTV.scrollEnabled = NO;
+    [self.view addSubview:contentTV];
+    //contentTV.backgroundColor = [UIColor greenColor];
+    
+    [contentTV mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.height.mas_equalTo(60);
+        make.left.equalTo(_protocolSelectBut.mas_right).offset(0);
+        make.right.mas_equalTo(-20);
+        make.top.equalTo(_protocolSelectBut.mas_top).offset(-2);
+    }];
+    
+    // 创建长按手势识别器
+    UILongPressGestureRecognizer *longPress = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(longPress)];
+    // 设置长按手势的最小按压时间
+    longPress.minimumPressDuration = 1.3; // 2
+    // 将手势识别器添加到视图上
+    [contentTV addGestureRecognizer:longPress];
+
+    NSString *title1 = NSLocalizedString(@"login_protocol_tip_1",nil);
+    NSString *title2 = NSLocalizedString(@"login_protocol_tip_2",nil);
+    NSString *title3 = NSLocalizedString(@"login_protocol_tip_3",nil);
+    NSString *title4 = NSLocalizedString(@"login_protocol_tip_4",nil);
+    NSString *title5 = NSLocalizedString(@"login_protocol_tip_5",nil);
+    
+    
+    NSString *fullTitle = [[NSString alloc] initWithFormat:@"%@%@%@%@%@",title1,title2,title3,title4,title5];
+    
+    NSMutableAttributedString *attrStr = [[NSMutableAttributedString alloc] initWithString:fullTitle];
+    NSRange redRange = NSMakeRange([fullTitle rangeOfString:title2].location, [fullTitle rangeOfString:title2].length);
+    UIColor *noteColor =[UIColor hwColor:@"#13B2EB" alpha:1.0];
+    [attrStr addAttribute:NSForegroundColorAttributeName value:noteColor range:redRange];
+    
+    NSRange redRange4 = NSMakeRange([fullTitle rangeOfString:title4].location, [fullTitle rangeOfString:title4].length);
+    [attrStr addAttribute:NSForegroundColorAttributeName value:noteColor range:redRange4];
+    
+    [attrStr addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:14.0] range:NSMakeRange(0, attrStr.length)];
+    
+    // 设置段落样式以实现水平中间对齐
+    NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
+    paragraphStyle.alignment = NSTextAlignmentLeft; // 水平中间对齐
+    [attrStr addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0, attrStr.length)];
+      
+      
+    
+    [attrStr addAttribute:NSLinkAttributeName
+                                   value:@"didclick1://"
+                                   range:redRange];
+    
+    [attrStr addAttribute:NSLinkAttributeName
+                                   value:@"didclick2://"
+                                   range:redRange4];
+    
+    contentTV.attributedText = attrStr;
+    
+}
+
+#pragma mark ---- textView Delegate ----
+- (BOOL)textView:(UITextView *)textView shouldInteractWithURL:(NSURL *)URL inRange:(NSRange)characterRange interaction:(UITextItemInteraction)interaction
+{
+    HLog(@"按事件")
+    if([[URL scheme] isEqualToString:@"didclick1"]){
+        [self ruleBtnClick];
+        return NO;
+    }
+    else if([[URL scheme] isEqualToString:@"didclick2"]){
+        [self privateBtnClick];
+        return NO;
+    }
+    
+    return YES;
+    
+}
+
+-(BOOL)textViewShouldBeginEditing:(UITextView *)textView
+{
+    return NO;
+}
+
+#pragma mark 拦截长按事件
+- (void)longPress{
+    HLog(@"拦截长按事件")
+}
+
+#pragma mark - UITextFieldDelegate Methods
+ 
+- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string {
+    // 允许删除操作
+    if (string.length == 0) {
+        return YES;
+    }
+    
+    // 定义允许输入的字符集
+    NSCharacterSet *allowedCharacters = [NSCharacterSet alphanumericCharacterSet];
+    
+    // 检查输入的字符是否在允许的字符集中
+    for (NSInteger i = 0; i < string.length; i++) {
+        unichar character = [string characterAtIndex:i];
+        if (![allowedCharacters characterIsMember:character]) {
+            return NO;
+        }
+    }
+    
+    [self checkLoginButCanClickFun];
+    return YES;
+}
+
+- (void)textFieldDidEndEditing:(UITextField *)textField
+{
+    [self checkLoginButCanClickFun];
+}
+
+#pragma mark 点击登录
+- (void)didClickScanButtonFun:(UIButton*)but
+{
+    _scanBut.userInteractionEnabled = NO;
+    ScanToLoginViewController *vc =[ScanToLoginViewController new];
+    [self.navigationController pushViewController:vc animated:YES];
+    
+    KWeakSelf
+    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+        weakSelf.scanBut.userInteractionEnabled = YES;
+    });
+    
+    vc.didScanSNFun = ^(NSString * _Nonnull curSnStr) {
+        weakSelf.accountTF.text = curSnStr;
+        [weakSelf checkLoginButCanClickFun];
+    };
+}
+
+#pragma mark 点击登录
+- (void)didClickButtonFun:(UIButton*)but
+{
+    NSString *trimmedText = [_accountTF.text stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];
+    [self checkSNFunBy:trimmedText];
+}
+
+#pragma mark 点击协议
+- (void)didClickProtocolButtonFun:(UIButton*)but
+{
+    _protocolSelectBut.selected = !_protocolSelectBut.selected;
+    [self checkLoginButCanClickFun];
+}
+
+#pragma mark 检测登录按钮是否可用
+- (void)checkLoginButCanClickFun
+{
+    if(_protocolSelectBut.selected && _accountTF.text.length > 0){
+        if (!_loginOkBut.enabled) {
+            _loginOkBut.enabled = YES;
+            _gradientLayer.colors = @[(__bridge NSString *)[UIColor hwColor:@"#0CDEFD" alpha:1.0].CGColor, (__bridge NSString *)[UIColor hwColor:@"#058DFB" alpha:1.0].CGColor];
+        }
+    }
+    else{
+        if(_loginOkBut.enabled){
+            _loginOkBut.enabled = NO;
+            _gradientLayer.colors = @[(__bridge NSString *)[UIColor hwColor:@"#0CDEFD" alpha:0.5].CGColor, (__bridge NSString *)[UIColor hwColor:@"#058DFB" alpha:0.5].CGColor];
+        }
+    }
+}
+
+#pragma mark 验证SN
+- (void)checkSNFunBy:(NSString *)sn{
+    
+    if(sn.length != 22){
+        NSString *title1 = NSLocalizedString(@"login_input_error_tip",nil);
+        [[iToast makeText:title1] show];
+        return;
+    }
+    
+    
+    KWeakSelf
+    [[netWorkManager shareInstance] getThridMsgBySN:sn success:^(id  _Nonnull responseObject) {
+        DeviceThirdIdModel *model = responseObject;
+        if([model isKindOfClass:[DeviceThirdIdModel class]]){
+          
+            if(model.status == 0 && model.data){
+                ksharedAppDelegate.DeviceThirdIdMod = model;
+                [weakSelf gotoGuideViewFunBy:sn withResponseObject:model];
+            }
+            else{
+                NSInteger state = 2;
+                if (model.status == 201 || model.status == 202) {
+                    state = model.status;
+                }
+                
+                [weakSelf showAlertFun:state];
+            }
+        }
+        else{
+//            if(self->_didScanErrorFun){
+//                self->_didScanErrorFun(2);
+//            }
+            [weakSelf showAlertFun:2];
+        }
+        
+    } failure:^(NSError * _Nonnull error) {
+        [weakSelf showAlertFun:0];
+        
+//        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];
+//        });
+    }];
+}
+
+- (void)showAlertFun:(NSInteger)_getSNMsgcode
+{
+    
+    
+    NSString *linkErrTitle = NSLocalizedString(@"scan_sn_data_error_title",nil);
+    NSString *linkErrTip = NSLocalizedString(@"scan_sn_data_error_content",nil);
+    
+    if(_getSNMsgcode == 202){
+         linkErrTitle = NSLocalizedString(@"get_sn_msg_202_title",nil);
+         linkErrTip = NSLocalizedString(@"get_sn_msg_202_content",nil);
+    }else if (_getSNMsgcode == 201){
+        linkErrTitle = NSLocalizedString(@"get_sn_msg_201_title",nil);
+        linkErrTip = NSLocalizedString(@"get_sn_msg_201_content",nil);
+    }
+    
+    ComontAlretViewController *linkFailAlretVC= [[ComontAlretViewController alloc] initWithTiTle:linkErrTitle
+                                                                                      msg:linkErrTip
+                                                                                 imageStr:nil
+                                                                              cancelTitle:NSLocalizedString(@"guide_set_pwd_guide_know",nil)
+                                                                                  okTitle:nil isOkBtnHighlight:NO
+                                                                               didClickOk:^{
+        
+        
+     } didClickCancel:^{
+         
+     }];
+    
+     linkFailAlretVC.modalPresentationStyle = UIModalPresentationCustom;
+     
+     //[linkFailAlretVC setMsgTextAlignment:NSTextAlignmentLeft];
+     [self presentViewController:linkFailAlretVC animated:YES completion:^{
+         linkFailAlretVC.view.superview.backgroundColor = [UIColor clearColor];
+     }];
+}
+
+#pragma mark GuideViewController
+- (void)gotoGuideViewFunBy:(NSString*)sn withResponseObject:(DeviceThirdIdModel*)DeviceThirdIdMod
+{
+    //数据埋点
+    //[[netWorkManager shareInstance] DataEmbeddingPointBy:0 withEventValue:@"Scan_code"];
+    
+    NSDictionary *newDict = [[NSDictionary alloc] initWithObjectsAndKeys:sn,Const_Have_Add_Device_SN, nil];
+    [HWDataManager setObjectWithKey:Const_Have_Add_Device value:newDict];
+    [HWDataManager setBoolWithKey:stringKeyAddSn(Const_file_Transfe_working_background) value:YES];
+    
+    //不走引导页
+    [HWDataManager setBoolWithKey:Const_Have_Show_Guide value:YES];
+    
+    /*下一步*/
+//    GuideViewController *nextVC = [[GuideViewController alloc] init];
+//    nextVC.sn = sn;
+//    [self.navigationController pushViewController:nextVC animated:YES];
+    
+    //是否已经有密码了 有就是输入密码 没有就是设置密码
+    NSString *curPwd = DeviceThirdIdMod.data.password;
+    
+    if(curPwd && curPwd.length > 0){
+        BOOL haveOpenMask = ksharedAppDelegate.DeviceThirdIdMod.data.isPrivacyMode;
+        if(!haveOpenMask)
+        {
+            ksharedAppDelegate.isFirstInputPwdDone = YES;
+            [[NSNotificationCenter defaultCenter] postNotificationName:GuideOkNotification object:nil];
+           
+            dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+                [[NSNotificationCenter defaultCenter] postNotificationName:didInputPWDNotification object:nil];
+            });
+            
+            return;
+        }
+        
+        /*设置密码*/
+//            inputPWDViewController *nextVC = [[inputPWDViewController alloc] init];
+//            nextVC.isQRCodeType = YES;
+//            [self.navigationController pushViewController:nextVC animated:YES];
+        
+        [[NSNotificationCenter defaultCenter] postNotificationName:GuideOkNotification object:nil];
+    }
+    else{
+        /*设置密码*/
+//            SetPWDFirstViewController *nextVC = [[SetPWDFirstViewController alloc] init];
+//            [self.navigationController pushViewController:nextVC animated:YES];
+        
+        [[NSNotificationCenter defaultCenter] postNotificationName:GuideOkNotification object:nil];
+    }
+   
+}
+
+#pragma mark 用户协议
+- (void)ruleBtnClick {
+//https://cliys.armclouding.com/h5/protocol/protocol.html?agreementCoding=YSZYHXY2002&type=1
+//    [self gotoProtocolWKWebVCByPush:YES];
+    CustomerWebViewController *vc = [[CustomerWebViewController alloc] init];
+    vc.titleStr = NSLocalizedString(@"app_update_use_deal",nil);
+    NSString *url = @"https://cliys.armclouding.com/h5/protocol/protocol.html?agreementCoding=YSZYHXY2003&type=1";//[NSString stringWithFormat:@"%@/h5/protocol/protocol.html?agreementCoding=YSZYHXY2002&type=1", CloudService];
+    vc.webUrl = url;
+    [self.navigationController pushViewController:vc animated:YES];
+}
+
+#pragma mark 隐私协议
+- (void)privateBtnClick {
+    
+//    [self gotoPrivateProtocolWKWebVCByPush:YES];
+    CustomerWebViewController *vc = [[CustomerWebViewController alloc] init];
+    vc.titleStr = NSLocalizedString(@"app_update_private",nil);
+    NSString *url = @"https://cliys.armclouding.com/h5/protocol/protocol.html?agreementCoding=YSZYSXY2002&type=1";//[NSString stringWithFormat:@"%@/h5/protocol/protocol.html?agreementCoding=YSZYSXY2001&type=1", CloudService];
+    vc.webUrl = url;
+    [self.navigationController pushViewController:vc animated:YES];
+}
+@end

+ 16 - 0
创维盒子/code/Class/Guide/ScanToLoginViewController.h

@@ -0,0 +1,16 @@
+//
+//  ScanToLoginViewController.h
+//  Private-x
+//
+//  Created by xd h on 2025/1/17.
+//
+
+#import "BaseViewController.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface ScanToLoginViewController : BaseViewController
+@property (nonatomic,copy) void (^didScanSNFun)(NSString* curSnStr);
+@end
+
+NS_ASSUME_NONNULL_END

+ 493 - 0
创维盒子/code/Class/Guide/ScanToLoginViewController.m

@@ -0,0 +1,493 @@
+//
+//  QRCodeScanViewController.m
+//  隐私保护
+//
+//  Created by APPLE on 2023/9/19.
+//
+
+#import "ScanToLoginViewController.h"
+#import <AVFoundation/AVFoundation.h>
+#import <ImageIO/ImageIO.h>
+#import "RSATool.h"
+#import <TZImageManager.h>
+#import <TZImagePickerController.h>
+
+@interface ScanToLoginViewController ()<AVCaptureMetadataOutputObjectsDelegate,AVCaptureVideoDataOutputSampleBufferDelegate,UINavigationControllerDelegate,UIImagePickerControllerDelegate,TZImagePickerControllerDelegate>
+
+@property(nonatomic,strong)AVCaptureVideoPreviewLayer *layer;
+
+//捕捉会话
+@property(nonatomic,strong)AVCaptureSession *session;
+
+//辅助区域框
+@property(nonatomic,strong)UIImageView * cyanEdgeImageView;
+@property(nonatomic,strong)UIImageView * qrCodeScanLine;
+@property(nonatomic,strong)NSTimer * scanLineTimer;
+
+////打开灯光btn,默认为hidden
+//
+//@property(nonatomic,strong)UIButton * lightBtn;
+//
+////获取相册图片进行扫描
+//
+//@property(nonatomic,strong)UIButton * photoBtn;
+@end
+
+@implementation ScanToLoginViewController
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    // Do any additional setup after loading the view.
+    
+    [self.navigationBar setHidden:YES];
+    [self.toolBar setHidden:YES];
+    
+    AVAuthorizationStatus authStatus =[AVCaptureDevice authorizationStatusForMediaType:AVMediaTypeVideo];
+    //判断摄像头状态是否可用
+    if(authStatus==AVAuthorizationStatusAuthorized){
+        [self startScan];
+    }else{
+        NSLog(@"未开启相机权限,请前往设置中开启");
+        [AVCaptureDevice requestAccessForMediaType:AVMediaTypeVideo completionHandler:^(BOOL granted) {
+            dispatch_async(dispatch_get_main_queue(), ^{
+                if (granted) {
+                    // 用户同意授权
+                    [self startScan];;
+                } else {
+                    // 用户拒绝授权
+                    [self showPermissionDeniedAlert];
+                }
+            });
+    
+        }];
+    }
+}
+
+- (void)showPermissionDeniedAlert {
+    
+    NSString * titleStr = NSLocalizedString(@"Camera_permissions_disabled",nil);
+    NSString * tipStr = NSLocalizedString(@"Camera_permissions_open_tip",nil);
+    UIAlertController *alert = [UIAlertController alertControllerWithTitle:titleStr
+                                                                   message:tipStr
+                                                            preferredStyle:UIAlertControllerStyleAlert];
+    
+    NSString* cancelStr = NSLocalizedString(@"other_cancel",nil);
+    UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:cancelStr style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
+        
+        [self backBtnPressed];
+    }];
+    
+    NSString*settingStr = NSLocalizedString(@"set_Privacy_button_title",nil);
+    UIAlertAction *settingsAction = [UIAlertAction actionWithTitle:settingStr style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
+        [self backBtnPressed];
+        
+        // 跳转到应用设置页面
+        NSURL *settingsURL = [NSURL URLWithString:UIApplicationOpenSettingsURLString];
+        if ([[UIApplication sharedApplication] canOpenURL:settingsURL]) {
+            [[UIApplication sharedApplication] openURL:settingsURL options:@{} completionHandler:nil];
+        }
+        
+    }];
+    
+    [alert addAction:cancelAction];
+    [alert addAction:settingsAction];
+    
+    [self presentViewController:alert animated:YES completion:nil];
+}
+
+-(void)viewWillDisappear:(BOOL)animated
+{
+    [super viewWillDisappear:animated];
+    if(_scanLineTimer)[_scanLineTimer  invalidate];
+}
+
+//开始扫描二维码
+
+-(void)startScan{
+    //1.创建捕捉会话,AVCaptureSession是第一个要被创建的对象,所有的操作都要基于这一个session
+    self.session = [[AVCaptureSession alloc]init];
+    AVCaptureDevice *device = [AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeVideo];
+
+AVCaptureDeviceInput *input = [AVCaptureDeviceInput deviceInputWithDevice:device error:nil];
+
+    [self.session addInput:input];
+
+
+
+    //3.添加输出数据(示例对象-->类对象-->元类对象-->根元类对象)
+
+    /*输入的类是AVCaptureInput,那么输出的类相应的就应该是AVCaptureOutput。
+
+ 输出不需要和设备挂钩,因为一般情况下,我们的输出要么是音频或视频文件,要么是一些其他的数据,像二维码扫描一般是字符串类型。
+
+ 所以创建AVCaptureOutput实例就不需要AVCaptureDevice对象。
+
+ AVCaptureOutput也同样是一个抽象类,同样要使用其子类,在这里我们扫描二维码,
+
+ 使用的是AVCaptureMetadataOutput,设置代码如下所示*/
+
+
+    AVCaptureMetadataOutput *output = [[AVCaptureMetadataOutput alloc] init];
+    [output setMetadataObjectsDelegate:self queue:dispatch_get_main_queue()];
+
+    //设置能扫描的区域,这里注意,CGRectMake的x,y和width,height的值是互换位置
+
+    output.rectOfInterest=CGRectMake(250/self.view.frame.size.height, 100/self.view.frame.size.width, (self.view.frame.size.width-200)/self.view.frame.size.width, (self.view.frame.size.width-200)/self.view.frame.size.width);
+
+    [self.session addOutput:output];
+//设置输入元数据的类型(类型是二维码,条形码数据,注意,这个一定要写在添加到session后面,不然要崩溃,如果只需要扫描二维码只需要AVMetadataObjectTypeQRCode,如果还需要扫描条形码,那么全部添加上)
+    [output setMetadataObjectTypes:@[AVMetadataObjectTypeQRCode,
+                                     AVMetadataObjectTypeEAN8Code,
+                                     AVMetadataObjectTypeEAN13Code,
+                                     AVMetadataObjectTypeCode39Code,
+                                     AVMetadataObjectTypeCode39Mod43Code,
+                                     AVMetadataObjectTypeCode93Code,
+                                     AVMetadataObjectTypeCode128Code,
+                                     AVMetadataObjectTypePDF417Code,
+                                     AVMetadataObjectTypeAztecCode,
+                                     AVMetadataObjectTypeUPCECode,
+                                     AVMetadataObjectTypeInterleaved2of5Code,
+                                     AVMetadataObjectTypeITF14Code,
+                                     AVMetadataObjectTypeDataMatrixCode,
+                                   ]];
+
+
+
+    //4.添加扫描图层
+
+    self.layer = [AVCaptureVideoPreviewLayer layerWithSession:self.session];
+
+    self.layer.videoGravity=AVLayerVideoGravityResizeAspectFill;
+
+    self.layer.frame = self.view.bounds;
+
+    [self.view.layer addSublayer:self.layer];
+
+
+
+    //5.创建view,通过layer层进行设置边框宽度和颜色,用来辅助展示扫描的区域
+
+    _cyanEdgeImageView=[[UIImageView alloc] initWithFrame:CGRectMake(100, 250, self.view.frame.size.width-200, self.view.frame.size.width-200)];
+
+//    _cyanEdgeImageView.layer.borderWidth=2;
+//
+//    _cyanEdgeImageView.layer.borderColor =[UIColor cyanColor].CGColor;
+
+    _cyanEdgeImageView.image = [UIImage imageNamed:@"qrCode_scan_bg"];
+    [self.view addSubview:_cyanEdgeImageView];
+
+    _qrCodeScanLine=[[UIImageView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width-200, 1)];
+
+    _qrCodeScanLine.image = [UIImage imageNamed:@"qrCode_scan_line"];
+    [_cyanEdgeImageView addSubview:_qrCodeScanLine];
+
+    _scanLineTimer = [NSTimer scheduledTimerWithTimeInterval:0.05 target:self selector:@selector(scanLineDownAndUpFun) userInfo:nil repeats:YES];
+    
+    UILabel *tipLib = [[UILabel alloc] initWithFrame:CGRectMake(20, _cyanEdgeImageView.hw_max_y + 15, SCREEN_W - 40, 20)];
+    tipLib.text = NSLocalizedString(@"guide_qrcoede_tips_please",nil);
+    tipLib.font = [UIFont systemFontOfSize:14.0];
+    tipLib.textAlignment = NSTextAlignmentCenter;
+    tipLib.textColor = [UIColor whiteColor];
+    [self.view addSubview:tipLib];
+    
+    //6.创建检测光感源
+
+    AVCaptureVideoDataOutput *guangOutPut = [[AVCaptureVideoDataOutput alloc] init];
+
+    [guangOutPut setSampleBufferDelegate:self queue:dispatch_get_main_queue()];
+
+    //设置为高质量采集率
+
+    [self.session setSessionPreset:AVCaptureSessionPresetHigh];
+
+    //把光感源添加到会话
+    [self.session addOutput:guangOutPut];
+
+//    self.lightBtn=[[UIButton alloc]initWithFrame:CGRectMake(150, cyanView.frame.origin.y+cyanView.frame.size.height+100, self.view.frame.size.width-300, self.view.frame.size.width-300)];
+//
+//    self.lightBtn.backgroundColor=[UIColor grayColor];
+//
+//    [self.lightBtn addTarget:self action:@selector(lightBtnClick:) forControlEvents:UIControlEventTouchUpInside];
+//
+    
+    //打开相册
+    UIButton *openAlbunBut = [[UIButton alloc] init];
+    [openAlbunBut setTitle:NSLocalizedString(@"guide_qrcoede_open_album",nil) forState:UIControlStateNormal];
+    [openAlbunBut setTitleColor:[UIColor hwColor:@"#3B7FFF" alpha:1.0] forState:UIControlStateNormal];
+    openAlbunBut.titleLabel.font = [UIFont systemFontOfSize:14.0];
+    [openAlbunBut addTarget:self action:@selector(photoBtnClick:) forControlEvents:UIControlEventTouchUpInside];
+    openAlbunBut.backgroundColor = [UIColor hwColor:@"#FFFFFF" alpha:0.2];
+    [self.view addSubview:openAlbunBut];
+    openAlbunBut.layer.cornerRadius = 24;
+    openAlbunBut.layer.masksToBounds = YES;
+    
+    [openAlbunBut mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.width.mas_equalTo(140);
+        make.height.mas_equalTo(48);
+        make.centerX.mas_equalTo(0);
+        make.bottom.mas_equalTo(-80);
+    }];
+    
+    
+//    [self.view addSubview:self.lightBtn];
+//    self.photoBtn=[[UIButton alloc]initWithFrame:CGRectMake(100, self.lightBtn.frame.origin.y+self.lightBtn.frame.size.height+50, self.view.frame.size.width-200, 50)];
+//    [self.photoBtn setTitle:@"相册" forState:UIControlStateNormal];
+//    [self.photoBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
+//    self.photoBtn.backgroundColor=[UIColor orangeColor];
+//    [self.photoBtn addTarget:self action:@selector(photoBtnClick:) forControlEvents:UIControlEventTouchUpInside];
+//    [self.view addSubview:self.photoBtn];
+    //9.开始扫描
+    KWeakSelf
+    globalBlock(^{
+        [weakSelf.session startRunning];
+    });
+    
+    
+    //添加返回键
+    CGFloat btn_w_h  = 40;
+    CGFloat btn_show = 28;
+    UIButton *backBtn = [[UIButton alloc] init];
+    [self.view addSubview:backBtn];
+    [backBtn mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.top.mas_equalTo(H_STATE_BAR + (64.f - btn_w_h)/2.f);
+        make.left.mas_equalTo(10);
+        make.width.mas_equalTo(btn_w_h);
+        make.height.mas_equalTo(btn_w_h);
+    }];
+    [backBtn setImage:[UIImage imageNamed:@"icon_base_back"] forState:(UIControlStateNormal)];
+    [backBtn setImageEdgeInsets:(UIEdgeInsetsMake((btn_w_h - btn_show)/2.f, (btn_w_h - btn_show)/2.f, (btn_w_h - btn_show)/2.f, (btn_w_h - btn_show)/2.f))];
+    [backBtn addTarget:self
+                action:@selector(backBtnPressed)
+      forControlEvents:(UIControlEventTouchUpInside)];
+}
+
+#pragma mark timer 处理线上下移动
+bool isScantoLoginDownType = YES;
+-(void)scanLineDownAndUpFun
+{
+    [UIView animateWithDuration:0.01 animations:^{
+        
+        if(isScantoLoginDownType && self->_qrCodeScanLine.hw_y <= self->_cyanEdgeImageView.hw_h){
+            self->_qrCodeScanLine.hw_y += 2;
+            
+            if(self->_cyanEdgeImageView.hw_h - self->_qrCodeScanLine.hw_y <= 5){
+                isScantoLoginDownType = NO;
+            }
+        }
+        else if(!isScantoLoginDownType && self->_qrCodeScanLine.hw_y >= 0)
+        {
+            self->_qrCodeScanLine.hw_y -= 2;
+            
+            if(self->_qrCodeScanLine.hw_y <= 5){
+                isScantoLoginDownType = YES;
+            }
+        }
+    }];
+}
+
+//实现扫描的回调代理方法
+
+- (void)captureOutput:(AVCaptureOutput*)captureOutput didOutputMetadataObjects:(NSArray*)metadataObjects fromConnection:(AVCaptureConnection*)connection{
+
+//如果数组metadataObjects中有数据,metadataObjects是个数组类型
+
+    if(metadataObjects.count>0) {
+        
+        AVMetadataMachineReadableCodeObject*object = [metadataObjects lastObject];
+        
+        NSLog(@"%@",object.stringValue);
+        
+        /*扫描到有用信息时取消扫描*/
+        NSString *resStr = object.stringValue;//RK3908P1V62112465
+        
+        [self handleScanCodeResultFun:resStr];
+    }
+    else{
+        [[iToast makeText:NSLocalizedString(@"guide_qrcoede_tips_error",nil)] show];
+        NSLog(@"没有扫描到数据");
+    }
+}
+
+#pragma mark 处理扫码出来的数据
+- (void)handleScanCodeResultFun:(NSString*)resultStr
+{
+    NSString * resStr = resultStr;
+    
+    if(resStr.length > 22)
+    {
+        NSString*desStr  = [RSATool AES128Decrypt:resStr key:AESCODEKEEYY];
+        
+        if(desStr){//能解码
+            resStr = desStr;
+        }
+    }
+    //Ch0IKJCY9lOgokjfPBFE1cowdC1+tj7ywB2pZgSzjhc=
+    //sgl5OzDoVjY5SmGuL50/EnQ4n6Kw+DzRiE1oUjq7yAM=
+    
+    if (([resStr containsString:@"RK"] && (resStr.length == @"RK3908P1V62112465".length))
+        || resStr.length == @"0333933700223250017273".length
+         ){
+        
+        [_scanLineTimer  invalidate];
+        
+        //停止扫描
+        [self.session stopRunning];
+        
+        //移除扫描层layer
+        [self.layer removeFromSuperlayer];
+        
+        if(_didScanSNFun){
+            _didScanSNFun(resStr);
+        }
+        
+        //[self.navigationController popViewControllerAnimated:YES];
+        [self.navigationController popToRootViewControllerAnimated:YES];
+    }
+    else{
+        [[iToast makeText:NSLocalizedString(@"guide_qrcoede_tips_error",nil)] show];
+    }
+
+}
+
+
+//光感传感器代理
+-(void)captureOutput:(AVCaptureOutput*)captureOutput didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer fromConnection:(AVCaptureConnection*)connection{
+
+    //获取光线的值
+
+    CFDictionaryRef metadataDict = CMCopyDictionaryOfAttachments(NULL,sampleBuffer, kCMAttachmentMode_ShouldPropagate);
+
+    NSDictionary *metadata = [[NSMutableDictionary alloc] initWithDictionary:(__bridge NSDictionary*)metadataDict];
+
+    CFRelease(metadataDict);
+
+    NSDictionary *exifMetadata = [[metadata objectForKey:(NSString *)kCGImagePropertyExifDictionary] mutableCopy];
+
+    float brightnessValue = [[exifMetadata objectForKey:(NSString*)kCGImagePropertyExifBrightnessValue]floatValue];
+
+    NSLog(@"%f",brightnessValue);
+
+
+    // 根据brightnessValue的值来打开和关闭闪光灯,一般值小于0就需要打开,大于0就关闭
+
+//    if((brightnessValue <0)) {//显示闪光灯
+//        self.lightBtn.hidden=NO;
+//    }else if((brightnessValue >0)) {//隐藏闪光灯
+//        self.lightBtn.hidden=YES;
+//    }
+}
+
+////闪光灯按钮点击方法
+//
+//-(void)lightBtnClick:(UIButton*)sender{
+//    //判断当前设备是否有闪光灯
+//
+//    AVCaptureDevice * device=[AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeVideo];
+//
+//    BOOL result=[device hasTorch];
+//
+//    if(result==YES){
+//        if(self.lightBtn.isSelected==NO){
+//            self.lightBtn.selected=YES;
+//            self.lightBtn.backgroundColor=[UIColor greenColor];
+//            [device lockForConfiguration:nil];
+//            [device setTorchMode: AVCaptureTorchModeOn];//开
+//            [device unlockForConfiguration];
+//        }else if(self.lightBtn.isSelected==YES){
+//            self.lightBtn.selected=NO;
+//            self.lightBtn.backgroundColor=[UIColor grayColor];
+//            [device lockForConfiguration:nil];
+//            [device setTorchMode: AVCaptureTorchModeOff];//关
+//            [device unlockForConfiguration];
+//        }
+//    }else{
+//        NSLog(@"当前设备闪光灯不可用");
+//    }
+//}
+//
+////获取相册图片btn点击方法
+
+-(void)photoBtnClick:(UIButton*)sender{
+//    UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init];
+//    imagePicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
+//    // imagePicker.allowsEditing = YES;
+//    imagePicker.delegate=self;
+//    [self.navigationController presentViewController:imagePicker animated:YES completion:nil];
+    
+    [self photoClickFun];
+}
+
+- (void)photoClickFun
+{
+    TZImagePickerController *imagePicker = [[TZImagePickerController alloc] initWithMaxImagesCount:1 delegate:self];
+
+    imagePicker.allowPickingVideo=NO;
+    //imagePicker.isStatusBarDefault=YES;
+    imagePicker.allowTakePicture=NO;
+    imagePicker.allowPreview = NO;
+    // 4. 照片排列按修改时间升序
+    imagePicker.sortAscendingByModificationDate = YES;
+    [self presentViewController:imagePicker animated:YES completion:nil];
+
+}
+
+- (void)imagePickerController:(TZImagePickerController *)picker didFinishPickingPhotos:(NSArray<UIImage *> *)photos sourceAssets:(NSArray *)assets isSelectOriginalPhoto:(BOOL)isSelectOriginalPhoto
+{
+    if(photos && photos.count >= 1){
+        [self detectImageFunBy:photos.firstObject];
+    }
+    else{
+        [[iToast makeText:NSLocalizedString(@"guide_qrcoede_tips_error",nil)] show];
+    }
+}
+
+//UIImagePickerControllerDelegate选择图片的回调
+
+-(void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary<UIImagePickerControllerInfoKey,id> *)info {
+    //把UIimage类型转换成CIimage类型
+    UIImage *pickedImage = info[UIImagePickerControllerEditedImage] ?: info[UIImagePickerControllerOriginalImage];
+    
+    [picker dismissViewControllerAnimated:YES completion:^{
+        
+    }];
+    
+    [self detectImageFunBy:pickedImage];
+}
+
+
+#pragma mark 解析Uiimage
+- (void)detectImageFunBy:(UIImage*)pickedImage
+{
+    CIImage*detectImage = [CIImage imageWithData:UIImagePNGRepresentation(pickedImage)];
+    //解析扫描二维码结果字符串
+    CIDetector *detector = [CIDetector detectorOfType:CIDetectorTypeQRCode context:nil options:@{CIDetectorAccuracy: CIDetectorAccuracyLow}];
+    //CIQRCodeFeature*feature = (CIQRCodeFeature*)[detector featuresInImage:detectImage options:nil].firstObject;
+    NSArray *messageStringArr = (CIQRCodeFeature*)[detector featuresInImage:detectImage options:nil];
+    
+    //排除掉 http的
+    __block NSString *curQRCodeStr = nil;
+    for(CIQRCodeFeature*feature in messageStringArr){
+       
+        if([feature.messageString  rangeOfString:@"http"].location == NSNotFound){
+            curQRCodeStr = feature.messageString;
+            break;
+        }
+    }
+    
+    if(curQRCodeStr) {
+        NSLog(@"=================二维码结果为%@",curQRCodeStr);
+        [self handleScanCodeResultFun:curQRCodeStr];
+
+    }else{
+        [[iToast makeText:NSLocalizedString(@"guide_qrcoede_tips_error",nil)] show];
+        NSLog(@"没有扫描到数据");
+    }
+    
+//        //停止会话对象扫描
+//        [self.session stopRunning];
+//        //移除扫描层layer
+//        [self.layer removeFromSuperlayer];
+    
+}
+
+@end

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

@@ -561,6 +561,14 @@
 		6B4C0F962C0320710070EF2E /* NSObject+Extensions.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B4C0F912C0320710070EF2E /* NSObject+Extensions.h */; };
 		6B4D23B12B33DDBC005B718A /* imageVersionRenewTipView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B4D23AF2B33DDBB005B718A /* imageVersionRenewTipView.h */; };
 		6B4D23B22B33DDBC005B718A /* imageVersionRenewTipView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B4D23B02B33DDBB005B718A /* imageVersionRenewTipView.m */; };
+		6B5345112E162A8300D57749 /* LoginType1ViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B53450F2E162A8300D57749 /* LoginType1ViewController.h */; };
+		6B5345122E162A8300D57749 /* LoginType1ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B5345102E162A8300D57749 /* LoginType1ViewController.m */; };
+		6B5345132E162A8300D57749 /* LoginType1ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B5345102E162A8300D57749 /* LoginType1ViewController.m */; };
+		6B5345142E162A8300D57749 /* LoginType1ViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B53450F2E162A8300D57749 /* LoginType1ViewController.h */; };
+		6B5345172E162AA000D57749 /* ScanToLoginViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B5345152E162AA000D57749 /* ScanToLoginViewController.h */; };
+		6B5345182E162AA000D57749 /* ScanToLoginViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B5345162E162AA000D57749 /* ScanToLoginViewController.m */; };
+		6B5345192E162AA000D57749 /* ScanToLoginViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B5345162E162AA000D57749 /* ScanToLoginViewController.m */; };
+		6B53451A2E162AA000D57749 /* ScanToLoginViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B5345152E162AA000D57749 /* ScanToLoginViewController.h */; };
 		6B53949F2C81A99200195AA4 /* nasMixBackupsManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B53949E2C81A99200195AA4 /* nasMixBackupsManager.m */; };
 		6B5394A02C81A99200195AA4 /* nasMixBackupsManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B53949D2C81A99200195AA4 /* nasMixBackupsManager.h */; };
 		6B5394A12C81A99200195AA4 /* nasMixBackupsManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B53949D2C81A99200195AA4 /* nasMixBackupsManager.h */; };
@@ -1960,6 +1968,10 @@
 		6B4C0F922C0320710070EF2E /* NSObject+Extensions.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSObject+Extensions.m"; sourceTree = "<group>"; };
 		6B4D23AF2B33DDBB005B718A /* imageVersionRenewTipView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = imageVersionRenewTipView.h; sourceTree = "<group>"; };
 		6B4D23B02B33DDBB005B718A /* imageVersionRenewTipView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = imageVersionRenewTipView.m; sourceTree = "<group>"; };
+		6B53450F2E162A8300D57749 /* LoginType1ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LoginType1ViewController.h; sourceTree = "<group>"; };
+		6B5345102E162A8300D57749 /* LoginType1ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LoginType1ViewController.m; sourceTree = "<group>"; };
+		6B5345152E162AA000D57749 /* ScanToLoginViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ScanToLoginViewController.h; sourceTree = "<group>"; };
+		6B5345162E162AA000D57749 /* ScanToLoginViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ScanToLoginViewController.m; sourceTree = "<group>"; };
 		6B53949D2C81A99200195AA4 /* nasMixBackupsManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = nasMixBackupsManager.h; sourceTree = "<group>"; };
 		6B53949E2C81A99200195AA4 /* nasMixBackupsManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = nasMixBackupsManager.m; sourceTree = "<group>"; };
 		6B59963E2D8BE461009EE6FF /* searchBarThridTypeView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = searchBarThridTypeView.h; sourceTree = "<group>"; };
@@ -2567,6 +2579,10 @@
 				6BFF268B2AF8E1C600FCB4F7 /* forgetPwdViewController.m */,
 				6BFF26972AFA16D900FCB4F7 /* forgetSecretKeyViewController.h */,
 				6BFF26982AFA16DA00FCB4F7 /* forgetSecretKeyViewController.m */,
+				6B53450F2E162A8300D57749 /* LoginType1ViewController.h */,
+				6B5345102E162A8300D57749 /* LoginType1ViewController.m */,
+				6B5345152E162AA000D57749 /* ScanToLoginViewController.h */,
+				6B5345162E162AA000D57749 /* ScanToLoginViewController.m */,
 			);
 			path = Guide;
 			sourceTree = "<group>";
@@ -4295,6 +4311,7 @@
 				18FCE5442AD136FF0020F623 /* ShortcutManager.h in Headers */,
 				6B2170A02B15D39900656670 /* privacyModeTipViewController.h in Headers */,
 				6B63179D2BFD8CA000FF4FB4 /* videoPlayByAVPlayerViewController.h in Headers */,
+				6B53451A2E162AA000D57749 /* ScanToLoginViewController.h in Headers */,
 				181E84FB2A8F57A500292B96 /* ChangeLogoViewController.h in Headers */,
 				6B5B606A2B3D67B2009A2AE2 /* fileSetTableViewCell.h in Headers */,
 				18C4754F2A8E0DB5006129C0 /* MySetViewController.h in Headers */,
@@ -4454,6 +4471,7 @@
 				6BA464D92D2384E300AD08ED /* imageVersionUpdateFailView.h in Headers */,
 				186820192AB94877005702A6 /* GuideLastView.h in Headers */,
 				6BC741402C23DCD10049BA8D /* webSocketManager.h in Headers */,
+				6B5345142E162A8300D57749 /* LoginType1ViewController.h in Headers */,
 				6B6ABEEC2BFF5B2F00480BAC /* receiveSaveRecordTableView.h in Headers */,
 				6B5D86802C22EA5B008D25EA /* lastFileManager.h in Headers */,
 				6B0582632AFF4B7D00D37290 /* PhotoPreviewViewController.h in Headers */,
@@ -4607,6 +4625,7 @@
 				6BD506C52B9576A4006E7CB0 /* ShortcutManager.h in Headers */,
 				6BD506C62B9576A4006E7CB0 /* privacyModeTipViewController.h in Headers */,
 				6B63179E2BFD8CA000FF4FB4 /* videoPlayByAVPlayerViewController.h in Headers */,
+				6B5345172E162AA000D57749 /* ScanToLoginViewController.h in Headers */,
 				6BD506C72B9576A4006E7CB0 /* ChangeLogoViewController.h in Headers */,
 				6BD506C82B9576A4006E7CB0 /* fileSetTableViewCell.h in Headers */,
 				6BD506C92B9576A4006E7CB0 /* MySetViewController.h in Headers */,
@@ -4766,6 +4785,7 @@
 				6BA464DA2D2384E300AD08ED /* imageVersionUpdateFailView.h in Headers */,
 				6BD507012B9576A4006E7CB0 /* GuideLastView.h in Headers */,
 				6BC741422C23DCD10049BA8D /* webSocketManager.h in Headers */,
+				6B5345112E162A8300D57749 /* LoginType1ViewController.h in Headers */,
 				6B6ABEEE2BFF5B2F00480BAC /* receiveSaveRecordTableView.h in Headers */,
 				6B5D86812C22EA5B008D25EA /* lastFileManager.h in Headers */,
 				6BD507022B9576A4006E7CB0 /* PhotoPreviewViewController.h in Headers */,
@@ -5095,6 +5115,7 @@
 				6BD507202B9576A4006E7CB0 /* NSArray+JSONModel.m in Sources */,
 				6BD507212B9576A4006E7CB0 /* HWAddBookmarkViewController.m in Sources */,
 				6BD507222B9576A4006E7CB0 /* AuthCodeTextField.m in Sources */,
+				6B5345182E162AA000D57749 /* ScanToLoginViewController.m in Sources */,
 				6B7DDF332C424B5E00EBDFDD /* RcGameWQKeyChain.m in Sources */,
 				6BA08F5A2C01D05B00A2242D /* CWUploadTask+CheckInfo.m in Sources */,
 				6BD507232B9576A4006E7CB0 /* ShearDeviceUDPManager.m in Sources */,
@@ -5243,6 +5264,7 @@
 				6BD507672B9576A4006E7CB0 /* SimplePing.m in Sources */,
 				6B9773A42C637E3A00213317 /* nasUploadFileManager.m in Sources */,
 				6B6D42F32C295BCD006CAE3A /* playerSetView.m in Sources */,
+				6B5345122E162A8300D57749 /* LoginType1ViewController.m in Sources */,
 				6BD507682B9576A4006E7CB0 /* FMResultSet.m in Sources */,
 				6B34DC6E2BF2070D002DD1EF /* titleLabelReusableView.m in Sources */,
 				6B6D42ED2C290A06006CAE3A /* cloudPhoneSetView.m in Sources */,
@@ -5489,6 +5511,7 @@
 				183AE6012A89CE3C00B11CB0 /* NSArray+JSONModel.m in Sources */,
 				A00221DB27EAFF4A00E45F78 /* HWAddBookmarkViewController.m in Sources */,
 				6BFF26922AF9D88200FCB4F7 /* AuthCodeTextField.m in Sources */,
+				6B5345192E162AA000D57749 /* ScanToLoginViewController.m in Sources */,
 				6B7DDF322C424B5E00EBDFDD /* RcGameWQKeyChain.m in Sources */,
 				6BA08F592C01D05B00A2242D /* CWUploadTask+CheckInfo.m in Sources */,
 				18664FF52AC2B3A4008F8A61 /* ShearDeviceUDPManager.m in Sources */,
@@ -5637,6 +5660,7 @@
 				6BF52C9B2AD5546500A617DB /* SimplePing.m in Sources */,
 				6B9773A12C637E3A00213317 /* nasUploadFileManager.m in Sources */,
 				6B6D42F12C295BCD006CAE3A /* playerSetView.m in Sources */,
+				6B5345132E162A8300D57749 /* LoginType1ViewController.m in Sources */,
 				A08A950427E9A4E400C544BB /* FMResultSet.m in Sources */,
 				6B34DC6C2BF2070D002DD1EF /* titleLabelReusableView.m in Sources */,
 				6B6D42EB2C290A06006CAE3A /* cloudPhoneSetView.m in Sources */,