Browse Source

1.显示秘钥
2.忘记密码通过秘钥重新设置密码
3.保存公众号

huangxiaodong 2 years ago
parent
commit
8fbeb6ddc5
23 changed files with 695 additions and 9 deletions
  1. 40 0
      创维盒子/双子星云手机.xcodeproj/project.pbxproj
  2. 9 0
      创维盒子/双子星云手机/AppDelegate/Config/Notification.h
  3. 2 0
      创维盒子/双子星云手机/AppDelegate/SceneDelegate.h
  4. 58 2
      创维盒子/双子星云手机/AppDelegate/SceneDelegate.m
  5. BIN
      创维盒子/双子星云手机/Assets.xcassets/Guide/gongzhonghao.imageset/ gongzhonghao @2x.png
  6. 22 0
      创维盒子/双子星云手机/Assets.xcassets/Guide/gongzhonghao.imageset/Contents.json
  7. BIN
      创维盒子/双子星云手机/Assets.xcassets/Guide/gongzhonghao.imageset/gongzhonghao.png
  8. 23 0
      创维盒子/双子星云手机/Class/Guide/AuthCodeView/AuthCodeInputView.h
  9. 201 0
      创维盒子/双子星云手机/Class/Guide/AuthCodeView/AuthCodeInputView.m
  10. 26 0
      创维盒子/双子星云手机/Class/Guide/AuthCodeView/AuthCodeTextField.h
  11. 38 0
      创维盒子/双子星云手机/Class/Guide/AuthCodeView/AuthCodeTextField.m
  12. 1 1
      创维盒子/双子星云手机/Class/Guide/SetPWDFirstViewController.h
  13. 5 1
      创维盒子/双子星云手机/Class/Guide/SetPWDFirstViewController.m
  14. 1 1
      创维盒子/双子星云手机/Class/Guide/SetPWDSecondViewController.h
  15. 7 1
      创维盒子/双子星云手机/Class/Guide/SetPWDSecondViewController.m
  16. 16 0
      创维盒子/双子星云手机/Class/Guide/forgetPwdViewController.h
  17. 90 0
      创维盒子/双子星云手机/Class/Guide/forgetPwdViewController.m
  18. 16 0
      创维盒子/双子星云手机/Class/Guide/forgetSecretKeyViewController.h
  19. 103 0
      创维盒子/双子星云手机/Class/Guide/forgetSecretKeyViewController.m
  20. 31 0
      创维盒子/双子星云手机/Class/Guide/inputPWDViewController.m
  21. 2 2
      创维盒子/双子星云手机/CloudPlayer/PlayerViewController.mm
  22. 1 1
      创维盒子/双子星云手机/CloudPlayer/View/PlayerView.m
  23. 3 0
      创维盒子/双子星云手机/zh-Hans.lproj/Localizable.strings

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

@@ -166,6 +166,14 @@
 		6BF52CAE2AD82EA500A617DB /* PlayerControlButTipView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BF52CAC2AD82EA500A617DB /* PlayerControlButTipView.m */; };
 		6BFF26882AF8949F00FCB4F7 /* playerShowSecretkeyView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6BFF26862AF8949F00FCB4F7 /* playerShowSecretkeyView.h */; };
 		6BFF26892AF8949F00FCB4F7 /* playerShowSecretkeyView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BFF26872AF8949F00FCB4F7 /* playerShowSecretkeyView.m */; };
+		6BFF268C2AF8E1C600FCB4F7 /* forgetPwdViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 6BFF268A2AF8E1C600FCB4F7 /* forgetPwdViewController.h */; };
+		6BFF268D2AF8E1C600FCB4F7 /* forgetPwdViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BFF268B2AF8E1C600FCB4F7 /* forgetPwdViewController.m */; };
+		6BFF26912AF9D88200FCB4F7 /* AuthCodeTextField.h in Headers */ = {isa = PBXBuildFile; fileRef = 6BFF268F2AF9D88200FCB4F7 /* AuthCodeTextField.h */; };
+		6BFF26922AF9D88200FCB4F7 /* AuthCodeTextField.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BFF26902AF9D88200FCB4F7 /* AuthCodeTextField.m */; };
+		6BFF26952AF9D8CC00FCB4F7 /* AuthCodeInputView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6BFF26932AF9D8CC00FCB4F7 /* AuthCodeInputView.h */; };
+		6BFF26962AF9D8CC00FCB4F7 /* AuthCodeInputView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BFF26942AF9D8CC00FCB4F7 /* AuthCodeInputView.m */; };
+		6BFF26992AFA16DA00FCB4F7 /* forgetSecretKeyViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 6BFF26972AFA16D900FCB4F7 /* forgetSecretKeyViewController.h */; };
+		6BFF269A2AFA16DA00FCB4F7 /* forgetSecretKeyViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BFF26982AFA16DA00FCB4F7 /* forgetSecretKeyViewController.m */; };
 		6C21BF39CEECF8E81BD97788 /* libPods-双子星云手机Tests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 16C83602E592F43A82A92B3E /* libPods-双子星云手机Tests.a */; };
 		82762E13327622CA8A8512E6 /* libPods-隐私保护-双子星云手机UITests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5A7C795CAC690A410AE1E306 /* libPods-隐私保护-双子星云手机UITests.a */; };
 		A00221DB27EAFF4A00E45F78 /* HWAddBookmarkViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A00221D927EAFF4A00E45F78 /* HWAddBookmarkViewController.m */; };
@@ -495,6 +503,14 @@
 		6BF52CAC2AD82EA500A617DB /* PlayerControlButTipView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PlayerControlButTipView.m; sourceTree = "<group>"; };
 		6BFF26862AF8949F00FCB4F7 /* playerShowSecretkeyView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = playerShowSecretkeyView.h; sourceTree = "<group>"; };
 		6BFF26872AF8949F00FCB4F7 /* playerShowSecretkeyView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = playerShowSecretkeyView.m; sourceTree = "<group>"; };
+		6BFF268A2AF8E1C600FCB4F7 /* forgetPwdViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = forgetPwdViewController.h; sourceTree = "<group>"; };
+		6BFF268B2AF8E1C600FCB4F7 /* forgetPwdViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = forgetPwdViewController.m; sourceTree = "<group>"; };
+		6BFF268F2AF9D88200FCB4F7 /* AuthCodeTextField.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AuthCodeTextField.h; sourceTree = "<group>"; };
+		6BFF26902AF9D88200FCB4F7 /* AuthCodeTextField.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AuthCodeTextField.m; sourceTree = "<group>"; };
+		6BFF26932AF9D8CC00FCB4F7 /* AuthCodeInputView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AuthCodeInputView.h; sourceTree = "<group>"; };
+		6BFF26942AF9D8CC00FCB4F7 /* AuthCodeInputView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AuthCodeInputView.m; sourceTree = "<group>"; };
+		6BFF26972AFA16D900FCB4F7 /* forgetSecretKeyViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = forgetSecretKeyViewController.h; sourceTree = "<group>"; };
+		6BFF26982AFA16DA00FCB4F7 /* forgetSecretKeyViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = forgetSecretKeyViewController.m; sourceTree = "<group>"; };
 		71D630B0FBD97501D316E4AB /* Pods-隐私保护.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-隐私保护.release.xcconfig"; path = "Target Support Files/Pods-隐私保护/Pods-隐私保护.release.xcconfig"; sourceTree = "<group>"; };
 		86FBD9FD629A5194B7C58D9F /* Pods-双子星云手机-双子星云手机UITests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-双子星云手机-双子星云手机UITests.debug.xcconfig"; path = "Target Support Files/Pods-双子星云手机-双子星云手机UITests/Pods-双子星云手机-双子星云手机UITests.debug.xcconfig"; sourceTree = "<group>"; };
 		A00221D827EAFF4A00E45F78 /* HWAddBookmarkViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HWAddBookmarkViewController.h; sourceTree = "<group>"; };
@@ -722,6 +738,7 @@
 		1823A8232A85D66000CE2913 /* Guide */ = {
 			isa = PBXGroup;
 			children = (
+				6BFF268E2AF9D86600FCB4F7 /* AuthCodeView */,
 				18963B442AB84397006E7C50 /* GuideView.h */,
 				18963B452AB84397006E7C50 /* GuideView.m */,
 				186820172AB94877005702A6 /* GuideLastView.h */,
@@ -738,6 +755,10 @@
 				18EC79DB2ABC109F0084836A /* SetPWDSecondViewController.m */,
 				6BF52C9F2AD7C2F600A617DB /* inputPWDViewController.h */,
 				6BF52CA02AD7C2F600A617DB /* inputPWDViewController.m */,
+				6BFF268A2AF8E1C600FCB4F7 /* forgetPwdViewController.h */,
+				6BFF268B2AF8E1C600FCB4F7 /* forgetPwdViewController.m */,
+				6BFF26972AFA16D900FCB4F7 /* forgetSecretKeyViewController.h */,
+				6BFF26982AFA16DA00FCB4F7 /* forgetSecretKeyViewController.m */,
 			);
 			path = Guide;
 			sourceTree = "<group>";
@@ -1102,6 +1123,17 @@
 			path = customLaunchView;
 			sourceTree = "<group>";
 		};
+		6BFF268E2AF9D86600FCB4F7 /* AuthCodeView */ = {
+			isa = PBXGroup;
+			children = (
+				6BFF268F2AF9D88200FCB4F7 /* AuthCodeTextField.h */,
+				6BFF26902AF9D88200FCB4F7 /* AuthCodeTextField.m */,
+				6BFF26932AF9D8CC00FCB4F7 /* AuthCodeInputView.h */,
+				6BFF26942AF9D8CC00FCB4F7 /* AuthCodeInputView.m */,
+			);
+			path = AuthCodeView;
+			sourceTree = "<group>";
+		};
 		A003F69D27D841C800715CBF /* Base */ = {
 			isa = PBXGroup;
 			children = (
@@ -1452,6 +1484,8 @@
 			buildActionMask = 2147483647;
 			files = (
 				184C8AD02A94980D00F26650 /* CustomerWebViewController.h in Headers */,
+				6BFF26992AFA16DA00FCB4F7 /* forgetSecretKeyViewController.h in Headers */,
+				6BFF26912AF9D88200FCB4F7 /* AuthCodeTextField.h in Headers */,
 				184C8ADA2A949DAC00F26650 /* HaveNewVersionView.h in Headers */,
 				6BBB35DD2AE76AD800E4A59B /* AudioSessionObject.h in Headers */,
 				183AE6D12A8CA98C00B11CB0 /* CloudPhoneAPI.h in Headers */,
@@ -1467,6 +1501,7 @@
 				18FCE5332AD12FE00020F623 /* ConnectTestViewController.h in Headers */,
 				181E84F22A8F0A9B00292B96 /* HelpDownScrollView.h in Headers */,
 				6BF0F3D02AD391D8000AA133 /* connectDeviceManager.h in Headers */,
+				6BFF26952AF9D8CC00FCB4F7 /* AuthCodeInputView.h in Headers */,
 				18FCE5442AD136FF0020F623 /* ShortcutManager.h in Headers */,
 				181E84FB2A8F57A500292B96 /* ChangeLogoViewController.h in Headers */,
 				18C4754F2A8E0DB5006129C0 /* MySetViewController.h in Headers */,
@@ -1483,6 +1518,7 @@
 				183AE6D42A8CAFAE00B11CB0 /* UIView+View.h in Headers */,
 				184C8ACC2A94557200F26650 /* HidenMaskSetViewController.h in Headers */,
 				18EC79DC2ABC109F0084836A /* SetPWDSecondViewController.h in Headers */,
+				6BFF268C2AF8E1C600FCB4F7 /* forgetPwdViewController.h in Headers */,
 				6BF52C992AD5546500A617DB /* Reachability.h in Headers */,
 				18BB18412AC417CB00A36F63 /* RYShearDeviceUDPManager.h in Headers */,
 				184C8AD52A949D5900F26650 /* AboutViewController.h in Headers */,
@@ -1788,6 +1824,7 @@
 				18EC79DD2ABC109F0084836A /* SetPWDSecondViewController.m in Sources */,
 				183AE6012A89CE3C00B11CB0 /* NSArray+JSONModel.m in Sources */,
 				A00221DB27EAFF4A00E45F78 /* HWAddBookmarkViewController.m in Sources */,
+				6BFF26922AF9D88200FCB4F7 /* AuthCodeTextField.m in Sources */,
 				18664FF52AC2B3A4008F8A61 /* ShearDeviceUDPManager.m in Sources */,
 				6BF52CA22AD7C2F600A617DB /* inputPWDViewController.m in Sources */,
 				A003F6B627D841EE00715CBF /* UIColor+Colors.m in Sources */,
@@ -1808,6 +1845,7 @@
 				A031DD7A27EC713A00909527 /* HWSetViewController.m in Sources */,
 				183AE6022A89CE3C00B11CB0 /* JSONValueTransformer.m in Sources */,
 				183AE6522A8A2CF000B11CB0 /* AFAutoPurgingImageCache.m in Sources */,
+				6BFF26962AF9D8CC00FCB4F7 /* AuthCodeInputView.m in Sources */,
 				6BBB35E32AE935C000E4A59B /* DDYLanguageTool.m in Sources */,
 				6BBB35DE2AE76AD800E4A59B /* AudioSessionObject.m in Sources */,
 				181E84FC2A8F57A500292B96 /* ChangeLogoViewController.m in Sources */,
@@ -1838,10 +1876,12 @@
 				183AE6042A89CE3C00B11CB0 /* JSONModel.m in Sources */,
 				18FCE5492AD15E750020F623 /* PlayerViewController+AppDelegate.m in Sources */,
 				6BF52C9A2AD5546500A617DB /* WHPingTester.m in Sources */,
+				6BFF268D2AF8E1C600FCB4F7 /* forgetPwdViewController.m in Sources */,
 				183AE6082A89CE3C00B11CB0 /* JSONHTTPClient.m in Sources */,
 				183AE6532A8A2CF000B11CB0 /* AFImageDownloader.m in Sources */,
 				A003F6B327D841EE00715CBF /* UIColor+HZXColor.m in Sources */,
 				18E557222A3C5D75005CC84B /* CalculatorViewController.m in Sources */,
+				6BFF269A2AFA16DA00FCB4F7 /* forgetSecretKeyViewController.m in Sources */,
 				18E5572F2A3C6141005CC84B /* UITextfield+NLLimit.m in Sources */,
 				183AE6B72A8CA0C100B11CB0 /* ShowImageView.m in Sources */,
 				186820262AB9B5BF005702A6 /* SetPWDFirstViewController.m in Sources */,

+ 9 - 0
创维盒子/双子星云手机/AppDelegate/Config/Notification.h

@@ -44,6 +44,15 @@
 /*设置密码通知*/
 #define setPwdNotification                 @"setPwdNot"
 
+/*忘记密码通知*/
+#define forgetPwdNotification                 @"forgetPwdNot"
+
+/*忘记密码回到原来切面通知*/
+#define forgetPwdBackNotification                 @"forgetPwdBackNot"
+
+/*忘记密码 设置完成通知*/
+#define forgetPwdDidSetNotification                 @"forgetPwdDidSetNot"
+
 /*主动上锁通知*/
 #define lockBypwdNotification                 @"lockBypwdNot"
 

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

@@ -6,10 +6,12 @@
 //
 
 #import <UIKit/UIKit.h>
+#import "PlayerViewController.h"
 
 @interface SceneDelegate : UIResponder <UIWindowSceneDelegate>
 
 @property (strong, nonatomic) UIWindow *window;
+@property(nonatomic, strong)   PlayerViewController *curPlayerVC;
 
 /** 登录界面 - 外部使用 */
 + (void)enterLoginVC;

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

@@ -16,11 +16,12 @@
 #import "TipsQRCodeViewController.h"
 #import "SetPWDFirstViewController.h"
 #import "ConnectTestViewController.h"
-#import "PlayerViewController.h"
+//#import "PlayerViewController.h"
 #import "connectDeviceManager.h"
 #import "inputPWDViewController.h"
 #import "customLaunchView.h"
 #import "RSATool.h"
+#import "forgetPwdViewController.h"
 
 @interface SceneDelegate ()<SetUsePWDViewControllerDelegate,GuideViewControllerDelegate>
 @property(nonatomic, strong)   CalculatorViewController *calculatorVC;
@@ -28,7 +29,9 @@
 @property(nonatomic, strong)   inputPWDViewController *inputVC;
 @property(nonatomic, strong)   NSTimer *checkSNDataTimer;//
 @property(nonatomic, strong)   customLaunchView *customLaunchV;//
-@property(nonatomic, strong)   PlayerViewController *curPlayerVC;
+//@property(nonatomic, strong)   PlayerViewController *curPlayerVC;
+
+@property(nonatomic, strong)  BaseNavigationController *preRootPlayerNav;
 
 @property(nonatomic, assign)   bool isQRCodeType;//第一次 扫码进来的
 @property(nonatomic, assign)   bool isNeedToShowSecretKey;//扫码进来的SN 没有密码 则需要显示秘钥
@@ -47,6 +50,11 @@
         
         [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(setPwdVCFun:)  name:setPwdNotification  object:nil];
         
+        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(forgetPwdFun:)  name:forgetPwdNotification  object:nil];
+        
+        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(forgetPwdBackFun:)  name:forgetPwdBackNotification  object:nil];
+        
+        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(forgetPwdDidSetPwdFun:)  name:forgetPwdDidSetNotification  object:nil];
         
         UIWindowScene *windowScene = (UIWindowScene *)scene;
         self.window = [[UIWindow alloc] initWithWindowScene:windowScene];
@@ -197,6 +205,8 @@
     BaseNavigationController *playerNav = [[BaseNavigationController alloc] initWithRootViewController:playerRootVC];
     self.window.rootViewController = playerNav;
     
+    _preRootPlayerNav = playerNav;
+    
     self.isLoginAgainType = NO;
     
     if(!_isQRCodeType){
@@ -443,6 +453,7 @@
         [self closeCalculatorVC];
         _inputVC = [[inputPWDViewController alloc] init];
         [self.window addSubview:_inputVC.view];
+        
     }
     else if (maskModel == 2){
         /*浏览器*/
@@ -577,4 +588,49 @@
 {
     _isNeedToShowSecretKey = YES;
 }
+
+#pragma mark 忘记密码
+- (void)forgetPwdFun:(NSNotification*)not
+{
+    
+    [_curPlayerVC disconnectVideoServer];
+    _preRootPlayerNav = nil;
+    
+    /*忘记密码*/
+    forgetPwdViewController *forgetPwdVC = [[forgetPwdViewController alloc] init];
+    BaseNavigationController *forgetPwdVCNav = [[BaseNavigationController alloc] initWithRootViewController:forgetPwdVC];
+    self.window.rootViewController = forgetPwdVCNav;
+    
+}
+
+#pragma mark 忘记密码返回
+- (void)forgetPwdBackFun:(NSNotification*)not
+{
+    if(_preRootPlayerNav)
+    {
+        self.window.rootViewController = _preRootPlayerNav;
+    }
+    else{
+        [self enterMainVCFromScene];
+    }
+    
+    [self showCalculatorVC];
+}
+
+#pragma mark 忘记密码设置密码完成
+- (void)forgetPwdDidSetPwdFun:(NSNotification*)not
+{
+    if(_preRootPlayerNav)
+    {
+        self.window.rootViewController = _preRootPlayerNav;
+    }
+    else{
+        [self enterMainVCFromScene];
+    }
+    
+    [self closeCalculatorVC];
+    
+    [connectDeviceManager shareInstance].isFirstInputPwdDone = YES;
+}
+
 @end

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


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

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

BIN
创维盒子/双子星云手机/Assets.xcassets/Guide/gongzhonghao.imageset/gongzhonghao.png


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

@@ -0,0 +1,23 @@
+//
+//  AuthCodeInputView.h
+//  隐私保护
+//
+//  Created by xd h on 2023/11/7.
+//
+
+#import <UIKit/UIKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+typedef void (^AuthCodeInputViewBlock)(BOOL success);
+
+@interface AuthCodeInputView :UIView
+
+-(instancetype)initWithFrame:(CGRect)frame;
+
+@property (nonatomic,copy) AuthCodeInputViewBlock authSuccess;
+
+@end
+
+
+NS_ASSUME_NONNULL_END

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

@@ -0,0 +1,201 @@
+//
+//  AuthCodeInputView.m
+//  隐私保护
+//
+//  Created by xd h on 2023/11/7.
+//
+
+#import "AuthCodeInputView.h"
+#import "AuthCodeTextField.h"
+#import "connectDeviceManager.h"
+#import "RSATool.h"
+
+@interface AuthCodeInputView () <UITextFieldDelegate,AuthCodeDeleteDelegate>
+
+@property (nonatomic,strong) NSString *phone;
+
+@property (nonatomic,strong) UIView *backGround;
+
+@property (nonatomic,strong) NSMutableArray *tfArr;
+
+@property (nonatomic,strong) NSString *codeStr;
+
+@end
+
+@implementation AuthCodeInputView
+
+-(instancetype)initWithFrame:(CGRect)frame{
+    if(self = [super initWithFrame:frame])
+    {
+        //_phone = phone;
+        [self createSubviews];
+        [self sendSMSMessage];
+        [[NSNotificationCenter defaultCenter] addObserver:self
+                                                     selector:@selector(keyboardWillShow:)
+                                                         name:UIKeyboardWillShowNotification
+                                                       object:nil];
+    }
+    return self;
+}
+
+-(void)dealloc{
+    [[NSNotificationCenter defaultCenter]removeObserver:self];
+}
+
+// 发送短信验证码
+-(void)sendSMSMessage
+{
+}
+
+-(void)createSubviews
+{
+    _backGround = [[UIView alloc]init];
+    _backGround.backgroundColor = HWF5F7FAColor;
+    [self addSubview:_backGround];
+//    _backGround.layer.cornerRadius = 10;
+//    _backGround.layer.masksToBounds = YES;
+    
+    [_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);
+    }];
+   
+   
+    
+    UILabel *titleLab = [[UILabel alloc]init];
+    titleLab.text = @"请输入8位密钥";
+    titleLab.textColor = [UIColor hwColor:@"#333333" alpha:1.0];
+    titleLab.font = [UIFont systemFontOfSize:16];
+    titleLab.textAlignment = NSTextAlignmentCenter;
+    [_backGround addSubview:titleLab];
+    [titleLab sizeToFit];
+    [titleLab mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(0);
+        make.right.mas_equalTo(0);
+        make.top.mas_equalTo(40);
+        make.height.mas_equalTo(30);
+    }];
+    
+    
+    
+    self.tfArr = [NSMutableArray array];
+    // 八个输入框
+    NSInteger numOfInputs = 8;
+    CGFloat padding = 8;
+    CGFloat leftRightPadding = 15;
+    CGFloat allPadding = leftRightPadding *2 + (numOfInputs - 1)*padding;
+    CGFloat width = (SCREEN_W - allPadding)/8.0;
+    for (int i = 1 ; i <= numOfInputs; i ++) {
+        AuthCodeTextField *textF = [[AuthCodeTextField alloc]init];
+        textF.tag = i;
+        textF.auth_delegate = self;
+        textF.delegate = self;
+        [_backGround addSubview:textF];
+        [self.tfArr addObject:textF];
+        if(i == 1){
+            [textF becomeFirstResponder];
+        }
+//        CGFloat offset = 0;
+//        if(i <= 3){
+//            offset = -width*(3-i) - padding *(3-i) - padding/2 - width/2;
+//        }else{
+//            offset =  width*(i-4) + padding *(i-4) + padding/2 + width/2;
+//        }
+        [textF mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.top.equalTo(titleLab.mas_bottom).offset(25);
+            make.width.mas_equalTo(width);
+            make.height.mas_equalTo(85/2);
+            //make.centerX.mas_equalTo(offset);
+            make.left.mas_equalTo(leftRightPadding + (padding+width)*(i-1));
+        }];
+    }
+}
+
+#pragma mark  UITextFieldDelegate
+- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string
+{
+// 获取短信中提取的验证码,自动输入到输入框中
+    if(string.length > 1){
+        for (int i = 0 ; i < self.tfArr.count; i++) {
+            AuthCodeTextField *tf = self.tfArr[i];
+            tf.text = [string substringWithRange:NSMakeRange(i, 1)];
+        }
+        return NO;
+    }
+    NSInteger nextTag = textField.tag + 1;
+    UITextField *nextTextField = [self viewWithTag:nextTag];
+    if(string.length > 0){
+        textField.text = string;
+        if (nextTextField && [nextTextField.text isEqualToString:@""]) {
+            [nextTextField becomeFirstResponder];
+        }
+        else
+        {
+            self.codeStr = @"";
+            for (AuthCodeTextField *tf in self.tfArr) {
+                self.codeStr = [self.codeStr stringByAppendingString:tf.text];
+            }
+            HLog(@"输入的验证码:%@",self.codeStr);
+            
+            if(self.codeStr.length == 8){
+                [self checkAuthcode];
+            }
+        }
+        return NO;
+    }
+    else
+    {
+        return YES;
+    }
+}
+// 调用接口验证验证码正确性
+-(void)checkAuthcode
+{
+    NSString *snStr = [connectDeviceManager shareInstance].DeviceThirdIdMod.data.sn;
+    NSString *secretkey  = [RSATool sha256_8:snStr];
+    
+    NSString*inputCodeStr = [self.codeStr uppercaseString];
+    
+    if([secretkey isEqualToString:inputCodeStr]){
+        if(_authSuccess){
+            _authSuccess(YES);
+        }
+    }
+    else{
+       NSString* curTipStr = NSLocalizedString(@"logo_input_pwd_fail",nil);
+       [[iToast makeText:curTipStr] show];
+    }
+}
+
+-(void)closeAuthCodeInputView{
+    [self removeFromSuperview];
+}
+
+#pragma mark  AuthCodeDeleteDelegate 删除输入的值
+-(void)authCodeTextFieldDeleteBackward:(AuthCodeTextField *)textField
+{   self.codeStr = @"";
+    NSInteger lastTag = textField.tag - 1;
+    AuthCodeTextField *lastTextField = [self viewWithTag:lastTag];
+    [lastTextField becomeFirstResponder];
+}
+
+#pragma mark  NSNotificationCenter
+-(void)keyboardWillShow:(NSNotification *)notify
+{
+//    NSDictionary *userInfo = [notify userInfo];
+//    NSValue *aValue = [userInfo objectForKey:UIKeyboardFrameEndUserInfoKey];
+//    CGRect keyboardRect = [aValue CGRectValue];
+//    //height 就是键盘的高度
+//    int height = keyboardRect.size.height;
+//    [_backGround mas_remakeConstraints:^(MASConstraintMaker *make) {
+//        make.left.mas_equalTo(0);
+//        make.right.mas_equalTo(0);
+//        make.height.mas_equalTo(320);
+//        make.bottom.mas_equalTo(-height+10);
+//    }];
+}
+
+@end
+

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

@@ -0,0 +1,26 @@
+//
+//  AuthCodeTextField.h
+//  隐私保护
+//
+//  Created by xd h on 2023/11/7.
+//
+
+#import <UIKit/UIKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@class AuthCodeTextField;
+
+@protocol AuthCodeDeleteDelegate <NSObject>
+
+-(void)authCodeTextFieldDeleteBackward:(AuthCodeTextField *)textField;
+
+@end
+
+@interface AuthCodeTextField : UITextField
+
+@property (nonatomic,weak) id <AuthCodeDeleteDelegate>auth_delegate;
+
+@end
+
+NS_ASSUME_NONNULL_END

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

@@ -0,0 +1,38 @@
+//
+//  AuthCodeTextField.m
+//  隐私保护
+//
+//  Created by xd h on 2023/11/7.
+//
+
+#import "AuthCodeTextField.h"
+
+@implementation AuthCodeTextField
+
+-(instancetype)init{
+    if(self = [super init]){
+        //self.keyboardType = UIKeyboardTypeNumberPad;
+        self.textAlignment = NSTextAlignmentCenter;
+        self.backgroundColor = [UIColor hwColor:@"#E3E8F1" alpha:1.0];
+        self.layer.cornerRadius = 4;
+        self.layer.masksToBounds = YES;
+        self.textColor = [UIColor blackColor];
+        self.font = [UIFont boldSystemFontOfSize:16.0];
+       // iOS12.0 系统之后,可以自动获取短信中的验证码
+        if(@available(iOS 12.0,*)){
+           // self.textContentType = UITextContentTypeOneTimeCode;
+        }
+    }
+    return self;
+}
+// 把这个代理方法传递出去
+-(void)deleteBackward{
+    if(self.text.length == 0){
+        if([self.auth_delegate respondsToSelector:@selector(authCodeTextFieldDeleteBackward:)]){
+            [self.auth_delegate authCodeTextFieldDeleteBackward:self];
+        }
+    }
+    [super deleteBackward];
+}
+
+@end

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

@@ -10,7 +10,7 @@
 NS_ASSUME_NONNULL_BEGIN
 
 @interface SetPWDFirstViewController : BaseViewController
-
+@property(nonatomic,assign) bool isForgetPwdType;//是否是忘记密码进来的
 @end
 
 NS_ASSUME_NONNULL_END

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

@@ -30,7 +30,10 @@
     [self drawAnyView];
     
     //发个通知 记录进入了设置密码
-    [[NSNotificationCenter defaultCenter] postNotificationName:setPwdNotification object:nil];
+    if(!_isForgetPwdType){
+        [[NSNotificationCenter defaultCenter] postNotificationName:setPwdNotification object:nil];
+    }
+    
 }
 
 
@@ -339,6 +342,7 @@
         /*进入下一级确认密码*/
         SetPWDSecondViewController *nextVC = [[SetPWDSecondViewController alloc] init];
         nextVC.oldPWD = pwd;
+        nextVC.isForgetPwdType = _isForgetPwdType;
         [self.navigationController pushViewController:nextVC animated:YES];
     }
 }

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

@@ -12,7 +12,7 @@ NS_ASSUME_NONNULL_BEGIN
 @interface SetPWDSecondViewController : BaseViewController
 
 @property (nonatomic ,copy)NSString *oldPWD;
-
+@property(nonatomic,assign) bool isForgetPwdType;//是否是忘记密码进来的
 @end
 
 NS_ASSUME_NONNULL_END

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

@@ -306,7 +306,13 @@
     [[connectDeviceManager shareInstance] getThridMsgBySN:SNStr needReconnect:NO  didNetEnd:^(bool didSuc) {
         
         if(didSuc){
-            [[NSNotificationCenter defaultCenter] postNotificationName:GuideOkNotification object:nil];
+            if(self->_isForgetPwdType){
+                [[NSNotificationCenter defaultCenter] postNotificationName:forgetPwdDidSetNotification object:nil];
+            }
+            else{
+                [[NSNotificationCenter defaultCenter] postNotificationName:GuideOkNotification object:nil];
+            }
+            
         }
         else{
             [[iToast makeText:NSLocalizedString(@"log_login_system_busy",nil)] show];

+ 16 - 0
创维盒子/双子星云手机/Class/Guide/forgetPwdViewController.h

@@ -0,0 +1,16 @@
+//
+//  forgetPwdViewController.h
+//  隐私保护
+//
+//  Created by xd h on 2023/11/6.
+//
+
+#import "BaseViewController.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface forgetPwdViewController : BaseViewController
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 90 - 0
创维盒子/双子星云手机/Class/Guide/forgetPwdViewController.m

@@ -0,0 +1,90 @@
+//
+//  forgetPwdViewController.m
+//  隐私保护
+//
+//  Created by xd h on 2023/11/6.
+//
+
+#import "forgetPwdViewController.h"
+#import "AuthCodeInputView.h"
+#import "SetPWDFirstViewController.h"
+#import "forgetSecretKeyViewController.h"
+
+@interface forgetPwdViewController ()
+
+@end
+
+@implementation forgetPwdViewController
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    // Do any additional setup after loading the view.
+    
+    [self.toolBar setHidden:YES];
+    [self.navigationBar setHidden:YES];
+    [self.navBarBGView setHidden:NO];
+    
+    NSString *curTitle = NSLocalizedString(@"input_pwd_forget_secret_key",nil);
+    UIButton *rightBut = [[UIButton alloc] init];
+    //rightBut.backgroundColor = [UIColor redColor];
+    [rightBut setTitle:curTitle forState:UIControlStateNormal];
+    rightBut.titleLabel.font = [UIFont systemFontOfSize:16.0];
+    [rightBut  setTitleColor:[UIColor hwColor:@"#13B2EB" alpha:1.0] forState:UIControlStateNormal];
+    [rightBut addTarget:self action:@selector(rightBtnPressed) forControlEvents:UIControlEventTouchUpInside];
+    [self.navBarBGView addSubview:rightBut];
+    
+    [rightBut mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.centerY.equalTo(self.backBtn.mas_centerY);
+        make.width.mas_equalTo(80);
+        make.right.mas_equalTo(-20);
+        make.height.mas_equalTo(30);
+    }];
+    
+    [self initBaseUIfun];
+}
+
+#pragma mark 点击返回
+- (void)backBtnPressed{
+    //发个通知 记录进入了设置密码
+    [[NSNotificationCenter defaultCenter] postNotificationName:forgetPwdBackNotification object:nil];
+}
+
+#pragma mark 点击右导航线
+- (void)rightBtnPressed{
+    forgetSecretKeyViewController *vc = [forgetSecretKeyViewController new];
+    [self.navigationController pushViewController:vc animated:YES];
+}
+    
+#pragma mark UI
+- (void)initBaseUIfun
+{
+    self.view.backgroundColor = HWF5F7FAColor;
+    
+    AuthCodeInputView *view =  [[AuthCodeInputView alloc] init];
+    [self.view addSubview:view];
+    
+    [view mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(0);
+        make.top.mas_equalTo(self.navBarBGView.mas_bottom).offset(0);
+        make.right.mas_equalTo(0);
+        make.bottom.mas_equalTo(0);
+    }];
+    
+    
+    KWeakSelf
+    view.authSuccess = ^(BOOL success) {
+        if(success){
+            [weakSelf gotoSetPwdVCFun];
+        }
+    };
+}
+
+#pragma mark 跳转设置密码界面
+- (void)gotoSetPwdVCFun
+{
+    /*设置密码*/
+    SetPWDFirstViewController *nextVC = [[SetPWDFirstViewController alloc] init];
+    nextVC.isForgetPwdType = YES;
+    [self.navigationController pushViewController:nextVC animated:YES];
+}
+@end

+ 16 - 0
创维盒子/双子星云手机/Class/Guide/forgetSecretKeyViewController.h

@@ -0,0 +1,16 @@
+//
+//  forgetSecretKeyViewController.h
+//  隐私保护
+//
+//  Created by xd h on 2023/11/7.
+//
+
+#import "BaseViewController.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface forgetSecretKeyViewController : BaseViewController
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 103 - 0
创维盒子/双子星云手机/Class/Guide/forgetSecretKeyViewController.m

@@ -0,0 +1,103 @@
+//
+//  forgetSecretKeyViewController.m
+//  隐私保护
+//
+//  Created by xd h on 2023/11/7.
+//
+
+#import "forgetSecretKeyViewController.h"
+#import <Photos/Photos.h>
+
+@interface forgetSecretKeyViewController ()
+
+@end
+
+@implementation forgetSecretKeyViewController
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    // Do any additional setup after loading the view.
+    
+    [self.toolBar setHidden:YES];
+    [self.navigationBar setHidden:YES];
+    [self.navBarBGView setHidden:NO];
+    self.view.backgroundColor = HWF5F7FAColor;
+    
+    [self initBaseUIFun];
+}
+
+#pragma mark
+- (void)initBaseUIFun
+{
+    UIImageView *bgImageView = [[UIImageView alloc] init];
+    bgImageView.image = [UIImage imageNamed:@"gongzhonghao"];
+    //bgImageView.backgroundColor = [UIColor redColor];
+    bgImageView.userInteractionEnabled = YES;
+    [self.view addSubview:bgImageView];
+    
+    [bgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(0);
+        make.top.mas_equalTo(self.navBarBGView.mas_bottom).offset(0);
+        make.right.mas_equalTo(0);
+        make.bottom.mas_equalTo(0);
+    }];
+    
+    //长按保存相片
+    UILabel *tipLab = [[UILabel alloc] init];
+    tipLab.text = @"长按保存图片";
+    tipLab.textAlignment = NSTextAlignmentCenter;
+    tipLab.font = [UIFont systemFontOfSize:14.0];
+    tipLab.textColor = [UIColor whiteColor];
+    tipLab.backgroundColor = [UIColor hwColor:@"#FFFFFF" alpha:0.2];
+    [bgImageView addSubview:tipLab];
+    tipLab.layer.cornerRadius = 24;
+    tipLab.layer.masksToBounds = YES;
+    
+    [tipLab mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.width.mas_equalTo(140);
+        make.height.mas_equalTo(48);
+        make.centerX.mas_equalTo(0);
+        make.bottom.mas_equalTo(-35);
+    }];
+    
+    // 创建长按手势识别器
+    UILongPressGestureRecognizer *longPress = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(longPress:)];
+      
+    // 设置长按手势的最小按压时间
+    longPress.minimumPressDuration = 3; // 2秒
+      
+    // 将手势识别器添加到视图上
+    [bgImageView addGestureRecognizer:longPress];
+}
+
+- (void)longPress:(UILongPressGestureRecognizer *)gesture {
+    if (gesture.state == UIGestureRecognizerStateBegan) {
+        //NSLog(@"长按手势开始");
+        
+        UIImage *image = [UIImage imageNamed:@"gongzhonghao"];
+          
+        [self saveImage:image];
+            
+    }
+}
+
+- (void)saveImage:(UIImage *)image
+{
+    //保存图片到【相机胶卷】
+        /// 异步执行修改操作
+        [[PHPhotoLibrary sharedPhotoLibrary]performChanges:^{
+            [PHAssetChangeRequest creationRequestForAssetFromImage:image];
+        } completionHandler:^(BOOL success, NSError * _Nullable error) {
+            mainBlock(^{
+                if (error) {
+                    //NSLog(@"%@",@"保存失败");
+                    [[iToast makeText:@"存失败"] show];
+                } else {
+                    //NSLog(@"%@",@"保存成功");
+                    [[iToast makeText:@"保存成功"] show];
+                }
+            });
+            
+        }];
+}
+@end

+ 31 - 0
创维盒子/双子星云手机/Class/Guide/inputPWDViewController.m

@@ -8,6 +8,8 @@
 #import "inputPWDViewController.h"
 #import "connectDeviceManager.h"
 #import "RSATool.h"
+#import "forgetPwdViewController.h"
+#import "SceneDelegate.h"
 
 @interface inputPWDViewController (){
     NSString *pwd;
@@ -115,6 +117,22 @@
         make.top.mas_equalTo(151.f + H_STATE_BAR);
     }];
     
+    
+    
+    //忘记密码按钮
+    UIButton *forgetPwdBut = [[UIButton alloc] init];
+    [forgetPwdBut setTitle:NSLocalizedString(@"input_pwd_forget_pwd",nil) forState:(UIControlStateNormal)];
+    [forgetPwdBut setTitleColor:[UIColor hwColor:@"#13B2EB" alpha:1.0] forState:(UIControlStateNormal)];
+    [forgetPwdBut addTarget:self action:@selector(forgetPwdFun) forControlEvents:UIControlEventTouchUpInside];
+    //forgetPwdBut.backgroundColor = [UIColor redColor];
+    [self.view addSubview:forgetPwdBut];
+    [forgetPwdBut mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.top.mas_equalTo(pointView3.mas_bottom).offset(20.f);
+        make.centerX.mas_equalTo(0.f);
+        make.width.mas_equalTo(150);
+        make.height.mas_equalTo(40);
+    }];
+    
     /*下方绘制键盘按钮*/
     UIView *bgViewForNumberBoard = [[UIView alloc] init];
     [bgViewForNumberBoard setBackgroundColor:[UIColor clearColor]];
@@ -537,6 +555,19 @@
     }
 }
 
+
+
+#pragma mark 点击忘记密码
+- (void)forgetPwdFun
+{
+    //发个通知 记录进入了设置密码
+    [[NSNotificationCenter defaultCenter] postNotificationName:forgetPwdNotification object:nil];
+    //forgetPwdViewController *vc = [forgetPwdViewController new];
+    //[self.navigationController pushViewController:vc animated:YES];
+    
+    //SceneDelegate *sceneDelegate = (SceneDelegate *)self.window.rootViewController;
+}
+
 /*
 #pragma mark - Navigation
 

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

@@ -228,7 +228,7 @@ ComontAlretViewControllerDelegate>
     HLog(@"瑞云连接状态:%d",[[connectDeviceManager shareInstance] curConnectDeviceState]);
     
     //第一次进 先输入密码才能连接
-   // if([connectDeviceManager shareInstance].isFirstInputPwdDone){
+    if([connectDeviceManager shareInstance].isFirstInputPwdDone){
         if([connectDeviceManager shareInstance].DeviceThirdIdMod.data.isPingOk){
             ip = [connectDeviceManager shareInstance].DeviceThirdIdMod.data.ip;
             internetVideoPort = @"9100";
@@ -241,7 +241,7 @@ ComontAlretViewControllerDelegate>
                 [self didCanConnectServerFun];
             }
         }
-    //}
+    }
     
     
 }

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

@@ -67,7 +67,7 @@ ShowImageViewDelegate>{
                   inRect:CGRectMake(0, 0, glkshowImageView.drawableWidth, glkshowImageView.drawableHeight)
                 fromRect:[ciImage extent]];
     
-    //[self->glkshowImageView display];
+    [self->glkshowImageView display];
 }
 
 - (void)showIMage

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

@@ -235,3 +235,6 @@
 "player_Secret_key_copy" = "复制密钥";
 "player_Secret_key_copy_suc" = "密钥复制成功";
 "player_Secret_key_close" = "关闭";
+
+"input_pwd_forget_pwd" = "忘记密码";
+"input_pwd_forget_secret_key" = "忘记秘钥";