Explorar el Código

1.隐私模式提示页面

huangxiaodong hace 2 años
padre
commit
8bc531a0d1
Se han modificado 20 ficheros con 290 adiciones y 23 borrados
  1. 3 3
      创维盒子/双子星云手机.xcodeproj/project.pbxproj
  2. 9 2
      创维盒子/双子星云手机/AppDelegate/SceneDelegate.m
  3. 1 1
      创维盒子/双子星云手机/Assets.xcassets/AppIcon.appiconset/Contents.json
  4. BIN
      创维盒子/双子星云手机/Assets.xcassets/AppIcon.appiconset/icon-1024.png
  5. 14 0
      创维盒子/双子星云手机/Assets.xcassets/AppIconJSJ.appiconset/Contents.json
  6. 0 0
      创维盒子/双子星云手机/Assets.xcassets/AppIconJSJ.appiconset/编组 9备份.png
  7. 14 0
      创维盒子/双子星云手机/Assets.xcassets/AppIconLlq.appiconset/Contents.json
  8. BIN
      创维盒子/双子星云手机/Assets.xcassets/AppIconLlq.appiconset/浏览器.png
  9. 14 0
      创维盒子/双子星云手机/Assets.xcassets/AppIconPgy.appiconset/Contents.json
  10. BIN
      创维盒子/双子星云手机/Assets.xcassets/AppIconPgy.appiconset/icon.png
  11. 22 0
      创维盒子/双子星云手机/Assets.xcassets/Guide/privacy_Tip_bg.imageset/Contents.json
  12. BIN
      创维盒子/双子星云手机/Assets.xcassets/Guide/privacy_Tip_bg.imageset/privacy_Tip_bg@2x.png
  13. BIN
      创维盒子/双子星云手机/Assets.xcassets/Guide/privacy_Tip_bg.imageset/privacy_Tip_bg@3x.png
  14. 22 0
      创维盒子/双子星云手机/Assets.xcassets/Guide/privacy_Tip_set.imageset/Contents.json
  15. BIN
      创维盒子/双子星云手机/Assets.xcassets/Guide/privacy_Tip_set.imageset/privacy_Tip_set@2x.png
  16. BIN
      创维盒子/双子星云手机/Assets.xcassets/Guide/privacy_Tip_set.imageset/privacy_Tip_set@3x.png
  17. 12 9
      创维盒子/双子星云手机/Class/Guide/SetPWDSecondViewController.m
  18. 174 7
      创维盒子/双子星云手机/Class/Set/privacyMode/privacyModeTipViewController.m
  19. 1 1
      创维盒子/双子星云手机/CloudPlayer/PlayerViewController.mm
  20. 4 0
      创维盒子/双子星云手机/zh-Hans.lproj/Localizable.strings

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

@@ -1257,9 +1257,9 @@
 			isa = PBXGroup;
 			children = (
 				6B21708F2B15BAE700656670 /* privacyModeViewController.h */,
+				6B2170902B15BAE700656670 /* privacyModeViewController.m */,
 				6B21709E2B15D39900656670 /* privacyModeTipViewController.h */,
 				6B21709F2B15D39900656670 /* privacyModeTipViewController.m */,
-				6B2170902B15BAE700656670 /* privacyModeViewController.m */,
 			);
 			path = privacyMode;
 			sourceTree = "<group>";
@@ -2511,7 +2511,7 @@
 					"\"$(SRCROOT)/CloudPlayer/RCCloudPhoneSDK/RCHWDecode\"",
 				);
 				INFOPLIST_FILE = "双子星云手机/Info.plist";
-				INFOPLIST_KEY_CFBundleDisplayName = " 计算器";
+				INFOPLIST_KEY_CFBundleDisplayName = "Private-X";
 				INFOPLIST_KEY_NSCameraUsageDescription = "Private-X将需要使用您的摄像头用于头像拍照";
 				INFOPLIST_KEY_NSLocationAlwaysAndWhenInUseUsageDescription = "Private-X将需要使用您的地址信息以便于为您提供更准确的服务。";
 				INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "Private-X将需要使用您的地址信息以便于为您提供更准确的服务。";
@@ -2590,7 +2590,7 @@
 					"\"$(SRCROOT)/CloudPlayer/RCCloudPhoneSDK/RCHWDecode\"",
 				);
 				INFOPLIST_FILE = "双子星云手机/Info.plist";
-				INFOPLIST_KEY_CFBundleDisplayName = " 计算器";
+				INFOPLIST_KEY_CFBundleDisplayName = "Private-X";
 				INFOPLIST_KEY_NSCameraUsageDescription = "Private-X将需要使用您的摄像头用于头像拍照";
 				INFOPLIST_KEY_NSLocationAlwaysAndWhenInUseUsageDescription = "Private-X将需要使用您的地址信息以便于为您提供更准确的服务。";
 				INFOPLIST_KEY_NSLocationWhenInUseUsageDescription = "Private-X将需要使用您的地址信息以便于为您提供更准确的服务。";

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

@@ -139,7 +139,7 @@
             _checkSNDataTimer = [NSTimer scheduledTimerWithTimeInterval:0.5 target:self selector:@selector(enterMainVCFromScene) userInfo:nil repeats:YES];
             
             //BOOL haveOpenMask = [HWDataManager getBoolWithKey:Const_Mask_View_Open];
-            NSInteger maskModel = 1;// [HWDataManager getIntegerWithKey:Const_Mask_View_Model];
+            NSInteger maskModel =  [HWDataManager getIntegerWithKey:Const_Mask_View_Model];
             //添加默认启动图片
             if(!_customLaunchV && maskModel == 0){
                 _customLaunchV = [[customLaunchView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_W, SCREEN_H)];
@@ -446,8 +446,15 @@
     }
     
   
+    BOOL haveOpenMask = [connectDeviceManager shareInstance].DeviceThirdIdMod.data.isPrivacyMode;
+    if(!haveOpenMask)
+    {
+        [connectDeviceManager shareInstance].isFirstInputPwdDone = YES;
+        [[NSNotificationCenter defaultCenter] postNotificationName:ShowImgAndVoiceNotification object:nil];
+        return;
+    }
     
-    NSInteger maskModel = 1;//[HWDataManager getIntegerWithKey:Const_Mask_View_Model];
+    NSInteger maskModel = [HWDataManager getIntegerWithKey:Const_Mask_View_Model];
     if (maskModel == 0){
         //输入密码界面
         [self closeCalculatorVC];

+ 1 - 1
创维盒子/双子星云手机/Assets.xcassets/AppIcon.appiconset/Contents.json

@@ -1,7 +1,7 @@
 {
   "images" : [
     {
-      "filename" : "编组 9备份.png",
+      "filename" : "icon-1024.png",
       "idiom" : "universal",
       "platform" : "ios",
       "size" : "1024x1024"

BIN
创维盒子/双子星云手机/Assets.xcassets/AppIcon.appiconset/icon-1024.png


+ 14 - 0
创维盒子/双子星云手机/Assets.xcassets/AppIconJSJ.appiconset/Contents.json

@@ -0,0 +1,14 @@
+{
+  "images" : [
+    {
+      "filename" : "编组 9备份.png",
+      "idiom" : "universal",
+      "platform" : "ios",
+      "size" : "1024x1024"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

创维盒子/双子星云手机/Assets.xcassets/AppIcon.appiconset/编组 9备份.png → 创维盒子/双子星云手机/Assets.xcassets/AppIconJSJ.appiconset/编组 9备份.png


+ 14 - 0
创维盒子/双子星云手机/Assets.xcassets/AppIconLlq.appiconset/Contents.json

@@ -0,0 +1,14 @@
+{
+  "images" : [
+    {
+      "filename" : "浏览器.png",
+      "idiom" : "universal",
+      "platform" : "ios",
+      "size" : "1024x1024"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
创维盒子/双子星云手机/Assets.xcassets/AppIconLlq.appiconset/浏览器.png


+ 14 - 0
创维盒子/双子星云手机/Assets.xcassets/AppIconPgy.appiconset/Contents.json

@@ -0,0 +1,14 @@
+{
+  "images" : [
+    {
+      "filename" : "icon.png",
+      "idiom" : "universal",
+      "platform" : "ios",
+      "size" : "1024x1024"
+    }
+  ],
+  "info" : {
+    "author" : "xcode",
+    "version" : 1
+  }
+}

BIN
创维盒子/双子星云手机/Assets.xcassets/AppIconPgy.appiconset/icon.png


+ 22 - 0
创维盒子/双子星云手机/Assets.xcassets/Guide/privacy_Tip_bg.imageset/Contents.json

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

BIN
创维盒子/双子星云手机/Assets.xcassets/Guide/privacy_Tip_bg.imageset/privacy_Tip_bg@2x.png


BIN
创维盒子/双子星云手机/Assets.xcassets/Guide/privacy_Tip_bg.imageset/privacy_Tip_bg@3x.png


+ 22 - 0
创维盒子/双子星云手机/Assets.xcassets/Guide/privacy_Tip_set.imageset/Contents.json

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

BIN
创维盒子/双子星云手机/Assets.xcassets/Guide/privacy_Tip_set.imageset/privacy_Tip_set@2x.png


BIN
创维盒子/双子星云手机/Assets.xcassets/Guide/privacy_Tip_set.imageset/privacy_Tip_set@3x.png


+ 12 - 9
创维盒子/双子星云手机/Class/Guide/SetPWDSecondViewController.m

@@ -9,6 +9,8 @@
 #import <Masonry.h>
 
 #import "connectDeviceManager.h"
+#import "privacyModeTipViewController.h"
+
 @interface SetPWDSecondViewController (){
     NSString *pwd;
     UILabel *pointView0;
@@ -303,6 +305,7 @@
 #pragma mark 重新获取密码
 -(void)getPwdFunBy:(NSString*)SNStr
 {
+    KWeakSelf
     [[connectDeviceManager shareInstance] getThridMsgBySN:SNStr needReconnect:NO  didNetEnd:^(bool didSuc) {
         
         if(didSuc){
@@ -310,7 +313,8 @@
                 [[NSNotificationCenter defaultCenter] postNotificationName:forgetPwdDidSetNotification object:nil];
             }
             else{
-                [[NSNotificationCenter defaultCenter] postNotificationName:GuideOkNotification object:nil];
+//                [[NSNotificationCenter defaultCenter] postNotificationName:GuideOkNotification object:nil];
+                [weakSelf gotoPrivacyModeTipVCFun];
             }
             
         }
@@ -321,14 +325,13 @@
     }];
 }
 
-/*
-#pragma mark - Navigation
-
-// In a storyboard-based application, you will often want to do a little preparation before navigation
-- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
-    // Get the new view controller using [segue destinationViewController].
-    // Pass the selected object to the new view controller.
+- (void)gotoPrivacyModeTipVCFun
+{
+    privacyModeTipViewController *nextVC = [privacyModeTipViewController new];
+    //[self.navigationController pushViewController:nextVC animated:YES];
+    
+    UIWindow* window = [iTools getKeyWindow];
+    window.rootViewController = nextVC;
 }
-*/
 
 @end

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

@@ -6,6 +6,7 @@
 //
 
 #import "privacyModeTipViewController.h"
+#import "connectDeviceManager.h"
 
 @interface privacyModeTipViewController ()
 
@@ -16,16 +17,182 @@
 - (void)viewDidLoad {
     [super viewDidLoad];
     // Do any additional setup after loading the view.
+    
+    [self.view setBackgroundColor:[UIColor whiteColor]];
+    [self.toolBar setHidden:YES];
+    [self.navigationBar setHidden:YES];
+    [self.navBarBGView setHidden:YES];
+    
+    [self initBaseUIFun];
 }
 
-/*
-#pragma mark - Navigation
+- (void)initBaseUIFun
+{
+    UIImageView *topImageV = [[UIImageView alloc] init];
+    topImageV.image = [UIImage imageNamed:@"privacy_Tip_bg"];
+    [self.view addSubview:topImageV];
+    
+    CGFloat height = 320 * AUTOSCALE;
+    [topImageV mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(0);
+        make.top.mas_equalTo(0);
+        make.right.mas_equalTo(0);
+        make.height.mas_equalTo(height);
+    }];
+    
+    UIImageView *midImageV = [[UIImageView alloc] init];
+    midImageV.image = [UIImage imageNamed:@"privacy_Tip_set"];
+    [self.view addSubview:midImageV];
 
-// In a storyboard-based application, you will often want to do a little preparation before navigation
-- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
-    // Get the new view controller using [segue destinationViewController].
-    // Pass the selected object to the new view controller.
+    [midImageV mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.centerX.mas_equalTo(0);
+        make.top.mas_equalTo(56 + safeArea);
+        make.width.mas_equalTo(193);
+        make.height.mas_equalTo(176);
+    }];
+    
+    UILabel *topLab = [[UILabel alloc] init];
+    topLab.text = NSLocalizedString(@"my_set_Privacy_Mode_set",nil);
+    topLab.font = [UIFont systemFontOfSize:16.0];
+    topLab.textAlignment = NSTextAlignmentCenter;
+    [self.view addSubview:topLab];
+    
+    [topLab mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(0);
+        make.right.mas_equalTo(0);
+        make.top.mas_equalTo(topImageV.mas_bottom).offset(10);
+        make.height.mas_equalTo(20);
+    }];
+    
+    UILabel *tipLab1 = [[UILabel alloc] init];
+    tipLab1.text = NSLocalizedString(@"my_set_Privacy_Mode_tip1",nil);
+    tipLab1.textColor = [UIColor hwColor:@"#6A6A6A" alpha:1.0];
+    tipLab1.font = [UIFont systemFontOfSize:14.0];
+    tipLab1.textAlignment = NSTextAlignmentCenter;
+    tipLab1.numberOfLines = 0;
+    [self.view addSubview:tipLab1];
+    
+    [tipLab1 mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(30);
+        make.right.mas_equalTo(-30);
+        make.top.mas_equalTo(topLab.mas_bottom).offset(15);
+        make.height.mas_equalTo(40);
+    }];
+    
+    
+    UILabel *tipLab2 = [[UILabel alloc] init];
+    tipLab2.text = NSLocalizedString(@"my_set_Privacy_Mode_tip2",nil);
+    tipLab2.textColor = [UIColor hwColor:@"#2974DE" alpha:1.0];
+    tipLab2.font = [UIFont systemFontOfSize:14.0];
+    tipLab2.textAlignment = NSTextAlignmentCenter;
+    tipLab2.numberOfLines = 0;
+    [self.view addSubview:tipLab2];
+    
+    [tipLab2 mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(30);
+        make.right.mas_equalTo(-30);
+        make.top.mas_equalTo(tipLab1.mas_bottom).offset(10);
+        make.height.mas_equalTo(20);
+    }];
+    
+    //跳过
+    UIButton *skipBtn = [[UIButton alloc] init];
+    skipBtn.tag = 1;
+    [skipBtn addTarget:self action:@selector(didClickButFun:) forControlEvents:(UIControlEventTouchUpInside)];
+    [skipBtn setTitle:NSLocalizedString(@"guide_skip",nil) forState:(UIControlStateNormal)];
+    [skipBtn setTitleColor:[UIColor hwColor:@"#2974DE" alpha:1.0] forState:(UIControlStateNormal)];
+    [skipBtn.titleLabel setFont:[UIFont systemFontOfSize:14.f]];
+//    [skipBtn.layer setCornerRadius:14.f];
+//    skipBtn.layer.borderColor = [UIColor whiteColor].CGColor;
+//    skipBtn.layer.borderWidth = 1.0;
+//    [skipBtn setBackgroundColor:HWE3E8F1Color];
+    skipBtn.clipsToBounds = YES;
+    [self.view addSubview:skipBtn];
+    [skipBtn mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.centerX.mas_equalTo(0);
+        make.width.mas_equalTo(100.f);
+        make.bottom.mas_equalTo(-40);
+        make.height.mas_equalTo(40);
+    }];
+    
+    
+    /*开启隐私模式*/
+    UIButton* okBtn = [[UIButton alloc] init];
+    okBtn.tag = 2;
+    CGFloat okBtn_W= SCREEN_W - 15*2;
+    // gradient
+    CAGradientLayer *gl = [CAGradientLayer layer];
+    gl.frame = CGRectMake(0,0,okBtn_W,48);
+    gl.startPoint = CGPointMake(0, 0.5);
+    gl.endPoint = CGPointMake(1, 0.5);
+    gl.colors = @[(__bridge id)HW0CDEFDColor.CGColor, (__bridge id)HW058DFBColor.CGColor];
+    gl.locations = @[@(0), @(1.0f)];
+    okBtn.layer.cornerRadius = 24;
+    okBtn.clipsToBounds = YES;
+    [okBtn.layer addSublayer:gl];
+    [okBtn setTitle:NSLocalizedString(@"my_set_Privacy_Mode_open",nil) forState:(UIControlStateNormal)];
+    [okBtn setTitleColor:[UIColor whiteColor] forState:(UIControlStateNormal)];
+    [okBtn addTarget:self action:@selector(didClickButFun:) forControlEvents:UIControlEventTouchUpInside];
+    
+    [self.view addSubview:okBtn];
+    [okBtn mas_makeConstraints:^(MASConstraintMaker *make) {
+        //make.top.equalTo(pwdAgainTextField.mas_bottom).offset(16.f);
+        make.bottom.equalTo(skipBtn.mas_top).offset(-10.f);
+        make.left.mas_equalTo(15.f);
+        make.width.mas_equalTo(okBtn_W);
+        make.height.mas_equalTo(48);
+    }];
 }
-*/
 
+-(void)didClickButFun:(UIButton*)but
+{
+    NSInteger tag = but.tag;
+    
+    if(tag == 1){
+        [self handleOkFun];
+    }
+    else{
+        [self updatePrivacyModeFun];
+    }
+}
+
+#pragma mark 联网设置隐私模式
+- (void)updatePrivacyModeFun{
+    
+    [self showNewIndicatorWithCanBack:YES canTouch:NO];
+
+    BOOL haveOpenMask = YES;
+    NSString* curSn = [connectDeviceManager shareInstance].DeviceThirdIdMod.data.sn;
+    
+    NSMutableDictionary *paraDict = [NSMutableDictionary dictionary];
+    [paraDict setValue:curSn forKey:@"sn"];
+    [paraDict setValue:[NSNumber numberWithBool:!haveOpenMask] forKey:@"isPrivacyMode"];
+    
+    KWeakSelf
+    [[netWorkManager shareInstance] CommonPostCallBackCode:updatePrivacyMode Parameters:paraDict success:^(id  _Nonnull responseObject) {
+        HLog(@"%@", responseObject);
+      [self removeNewIndicator];
+
+      SuperModel *model = [[SuperModel alloc] initWithDictionary:responseObject error:nil];
+
+       if (model.status == 0) {
+           [connectDeviceManager shareInstance].DeviceThirdIdMod.data.isPrivacyMode = YES;
+           [weakSelf handleOkFun];
+       }
+       else
+       {
+           [[iToast makeText:model.msg] show];
+       }
+
+    } failure:^(NSError * _Nonnull error) {
+       HLog(@"%@", error);
+        [[iToast makeText:@"网络异常,请稍后重试!"] show];
+      [self removeNewIndicator];
+    }];
+}
+
+-(void)handleOkFun
+{
+    [[NSNotificationCenter defaultCenter] postNotificationName:GuideOkNotification object:nil];
+}
 @end

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

@@ -2070,7 +2070,7 @@ BOOL inReconnect = NO;
     HLog(@"yyyyyyyyyyyyy 重连次数 %ld ",reConnectAccount);
     
     //20231017 修改后台3分钟再次进入 不断转圈圈问题
-    if (reConnectAccount >0 && reConnectAccount == 10 )
+    if (reConnectAccount >0 && reConnectAccount == 50 )
     {
         mainBlock(^{
             

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

@@ -279,6 +279,10 @@
 "my_set_about_version_tap_sn"   = "SN号";
 "my_set_Privacy_Model"   = "隐私模式";
 "my_set_Privacy_Model_tip"   = "隐私模式下,具有设置登录密码、更换图标、翻转退出及进程隐藏等保护您个人信息安全的功能";
+"my_set_Privacy_Mode_set"   = "隐私模式设置";
+"my_set_Privacy_Mode_tip1"   = "隐私模式下,具有设置登录密码、更换图标、翻转退出及进程隐藏等保护您个人信息安全的功能";
+"my_set_Privacy_Mode_tip2"   = "若未选择开启隐私模式,可到设置中开启";
+"my_set_Privacy_Mode_open"   = "开启隐私模式";
 "my_set_no_change_login"   = "登录伪装";
 "logo_select_login"   = "请选择登录伪装";
 "logo_change_login_tip" = "此APP的登录方式将会更换为你选择的应用";