Просмотр исходного кода

推拉流处理 屏蔽横竖屏反转新增 设备反转退出app 设备重启等功能

wangjian 1 год назад
Родитель
Сommit
12fc25717e
46 измененных файлов с 1283 добавлено и 146 удалено
  1. 11 11
      Pods/Pods.xcodeproj/xcuserdata/apple.xcuserdatad/xcschemes/xcschememanagement.plist
  2. 24 0
      双子星云手机.xcodeproj/project.pbxproj
  3. BIN
      双子星云手机.xcworkspace/xcuserdata/apple.xcuserdatad/UserInterfaceState.xcuserstate
  4. 0 18
      双子星云手机.xcworkspace/xcuserdata/apple.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
  5. 29 2
      双子星云手机/AppDelegate/AppDelegate.m
  6. 3 0
      双子星云手机/AppDelegate/Config/Const.h
  7. 4 0
      双子星云手机/AppDelegate/Config/Const.m
  8. 3 0
      双子星云手机/AppDelegate/PrefixHeader.pch
  9. 7 0
      双子星云手机/AppDelegate/SceneDelegate.m
  10. 22 0
      双子星云手机/Assets.xcassets/Player/fanhui_you_icon.imageset/Contents.json
  11. BIN
      双子星云手机/Assets.xcassets/Player/fanhui_you_icon.imageset/fanhui_you_icon@2x.png
  12. BIN
      双子星云手机/Assets.xcassets/Player/fanhui_you_icon.imageset/fanhui_you_icon@3x.png
  13. 22 0
      双子星云手机/Assets.xcassets/Player/home_icon.imageset/Contents.json
  14. BIN
      双子星云手机/Assets.xcassets/Player/home_icon.imageset/home_icon@2x.png
  15. BIN
      双子星云手机/Assets.xcassets/Player/home_icon.imageset/home_icon@3x.png
  16. 22 0
      双子星云手机/Assets.xcassets/Player/houtai_icon.imageset/Contents.json
  17. BIN
      双子星云手机/Assets.xcassets/Player/houtai_icon.imageset/houtai_icon@2x.png
  18. BIN
      双子星云手机/Assets.xcassets/Player/houtai_icon.imageset/houtai_icon@3x.png
  19. 22 0
      双子星云手机/Assets.xcassets/Set/app_update.imageset/Contents.json
  20. BIN
      双子星云手机/Assets.xcassets/Set/app_update.imageset/编组 6@2x.png
  21. BIN
      双子星云手机/Assets.xcassets/Set/app_update.imageset/编组 6@3x.png
  22. 22 0
      双子星云手机/Assets.xcassets/Set/buy_recoder_icon.imageset/Contents.json
  23. BIN
      双子星云手机/Assets.xcassets/Set/buy_recoder_icon.imageset/编组 10@2x.png
  24. BIN
      双子星云手机/Assets.xcassets/Set/buy_recoder_icon.imageset/编组 10@3x.png
  25. 22 0
      双子星云手机/Assets.xcassets/Set/fanzhuan.imageset/Contents.json
  26. BIN
      双子星云手机/Assets.xcassets/Set/fanzhuan.imageset/编组 11@2x.png
  27. BIN
      双子星云手机/Assets.xcassets/Set/fanzhuan.imageset/编组 11@3x.png
  28. 5 0
      双子星云手机/Class/BuyPhone/BuyHome/BuyOrReExchangeViewController.h
  29. 1 0
      双子星云手机/Class/BuyPhone/BuyHome/BuyOrReExchangeViewController.m
  30. 17 1
      双子星云手机/Class/Login/LoginView/ViewForPhoneAndSMS.m
  31. 1 1
      双子星云手机/Class/Set/MineViewCell.h
  32. 18 1
      双子星云手机/Class/Set/MineViewCell.m
  33. 63 0
      双子星云手机/Class/Set/Model/UserDetailInfoModel.h
  34. 25 0
      双子星云手机/Class/Set/Model/UserDetailInfoModel.m
  35. 4 1
      双子星云手机/Class/Set/MySetViewController.h
  36. 166 35
      双子星云手机/Class/Set/MySetViewController.m
  37. 25 0
      双子星云手机/CloudPlayer/AlertVC/ComontAlretViewController.h
  38. 192 0
      双子星云手机/CloudPlayer/AlertVC/ComontAlretViewController.m
  39. 20 0
      双子星云手机/CloudPlayer/CloudPhoneAPI.h
  40. 1 1
      双子星云手机/CloudPlayer/PlayerViewController+RBD.m
  41. 65 35
      双子星云手机/CloudPlayer/PlayerViewController.mm
  42. 13 0
      双子星云手机/CloudPlayer/RCCommandHelp.h
  43. 313 32
      双子星云手机/CloudPlayer/RCCommandHelp.m
  44. 4 0
      双子星云手机/CloudPlayer/View/PlayerView.h
  45. 115 4
      双子星云手机/CloudPlayer/View/PlayerView.m
  46. 22 4
      双子星云手机/zh-Hans.lproj/Localizable.strings

+ 11 - 11
Pods/Pods.xcodeproj/xcuserdata/apple.xcuserdatad/xcschemes/xcschememanagement.plist

@@ -12,57 +12,57 @@
 		<key>HUPhotoBrowser.xcscheme_^#shared#^_</key>
 		<dict>
 			<key>orderHint</key>
-			<integer>5</integer>
+			<integer>7</integer>
 		</dict>
 		<key>IQKeyboardManager.xcscheme_^#shared#^_</key>
 		<dict>
 			<key>orderHint</key>
-			<integer>1</integer>
+			<integer>9</integer>
 		</dict>
 		<key>JQImagePicker.xcscheme_^#shared#^_</key>
 		<dict>
 			<key>orderHint</key>
-			<integer>2</integer>
+			<integer>11</integer>
 		</dict>
 		<key>MJExtension.xcscheme_^#shared#^_</key>
 		<dict>
 			<key>orderHint</key>
-			<integer>7</integer>
+			<integer>5</integer>
 		</dict>
 		<key>Masonry.xcscheme_^#shared#^_</key>
 		<dict>
 			<key>orderHint</key>
-			<integer>10</integer>
+			<integer>1</integer>
 		</dict>
 		<key>Pods-双子星云手机-双子星云手机UITests.xcscheme_^#shared#^_</key>
 		<dict>
 			<key>orderHint</key>
-			<integer>4</integer>
+			<integer>8</integer>
 		</dict>
 		<key>Pods-双子星云手机.xcscheme_^#shared#^_</key>
 		<dict>
 			<key>orderHint</key>
-			<integer>6</integer>
+			<integer>3</integer>
 		</dict>
 		<key>Pods-双子星云手机Tests.xcscheme_^#shared#^_</key>
 		<dict>
 			<key>orderHint</key>
-			<integer>3</integer>
+			<integer>6</integer>
 		</dict>
 		<key>SDWebImage.xcscheme_^#shared#^_</key>
 		<dict>
 			<key>orderHint</key>
-			<integer>8</integer>
+			<integer>4</integer>
 		</dict>
 		<key>SVProgressHUD.xcscheme_^#shared#^_</key>
 		<dict>
 			<key>orderHint</key>
-			<integer>11</integer>
+			<integer>10</integer>
 		</dict>
 		<key>TZImagePickerController.xcscheme_^#shared#^_</key>
 		<dict>
 			<key>orderHint</key>
-			<integer>9</integer>
+			<integer>2</integer>
 		</dict>
 	</dict>
 </dict>

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

@@ -129,6 +129,8 @@
 		187076742A9F32DC00F15F7F /* NoEnoughTimeViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 187076722A9F32DC00F15F7F /* NoEnoughTimeViewController.h */; };
 		187076772A9F400300F15F7F /* PlayerLoadingView.h in Headers */ = {isa = PBXBuildFile; fileRef = 187076752A9F400300F15F7F /* PlayerLoadingView.h */; };
 		187076782A9F400300F15F7F /* PlayerLoadingView.m in Sources */ = {isa = PBXBuildFile; fileRef = 187076762A9F400300F15F7F /* PlayerLoadingView.m */; };
+		1872BD432AB053090033E56F /* UserDetailInfoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1872BD412AB053090033E56F /* UserDetailInfoModel.m */; };
+		1872BD442AB053090033E56F /* UserDetailInfoModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 1872BD422AB053090033E56F /* UserDetailInfoModel.h */; };
 		1893CDCB2A178C3E0074B92F /* HWSetViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1893CDCD2A178C3E0074B92F /* HWSetViewController.xib */; };
 		1893CDD22A178D920074B92F /* HWAgreementViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1893CDD42A178D920074B92F /* HWAgreementViewController.xib */; };
 		1893CDD92A178DC10074B92F /* HWAboutViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1893CDDB2A178DC10074B92F /* HWAboutViewController.xib */; };
@@ -141,6 +143,8 @@
 		1894142C2A9DF0EF00F0A151 /* PayRecoderListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1894142A2A9DF0EF00F0A151 /* PayRecoderListViewController.m */; };
 		189414302A9DF88E00F0A151 /* BuyRecoderListCell.h in Headers */ = {isa = PBXBuildFile; fileRef = 1894142E2A9DF88E00F0A151 /* BuyRecoderListCell.h */; };
 		189414312A9DF88E00F0A151 /* BuyRecoderListCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 1894142F2A9DF88E00F0A151 /* BuyRecoderListCell.m */; };
+		18B35EFE2AB40BD0004287A0 /* ComontAlretViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 18B35EFC2AB40BD0004287A0 /* ComontAlretViewController.h */; };
+		18B35EFF2AB40BD0004287A0 /* ComontAlretViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 18B35EFD2AB40BD0004287A0 /* ComontAlretViewController.m */; };
 		18BA24872AA5C57900BA01EE /* RSATool.h in Headers */ = {isa = PBXBuildFile; fileRef = 18BA24852AA5C57900BA01EE /* RSATool.h */; };
 		18BA24882AA5C57900BA01EE /* RSATool.m in Sources */ = {isa = PBXBuildFile; fileRef = 18BA24862AA5C57900BA01EE /* RSATool.m */; };
 		18BA248B2AA5D48D00BA01EE /* WXPayManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 18BA24892AA5D48C00BA01EE /* WXPayManager.h */; };
@@ -445,6 +449,8 @@
 		187076722A9F32DC00F15F7F /* NoEnoughTimeViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NoEnoughTimeViewController.h; sourceTree = "<group>"; };
 		187076752A9F400300F15F7F /* PlayerLoadingView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PlayerLoadingView.h; sourceTree = "<group>"; };
 		187076762A9F400300F15F7F /* PlayerLoadingView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PlayerLoadingView.m; sourceTree = "<group>"; };
+		1872BD412AB053090033E56F /* UserDetailInfoModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UserDetailInfoModel.m; sourceTree = "<group>"; };
+		1872BD422AB053090033E56F /* UserDetailInfoModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UserDetailInfoModel.h; sourceTree = "<group>"; };
 		1893CDCC2A178C3E0074B92F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/HWSetViewController.xib; sourceTree = "<group>"; };
 		1893CDCF2A178C410074B92F /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/HWSetViewController.strings; sourceTree = "<group>"; };
 		1893CDD12A178C420074B92F /* zh-Hans */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "zh-Hans"; path = "zh-Hans.lproj/HWSetViewController.strings"; sourceTree = "<group>"; };
@@ -467,6 +473,8 @@
 		1894142A2A9DF0EF00F0A151 /* PayRecoderListViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PayRecoderListViewController.m; sourceTree = "<group>"; };
 		1894142E2A9DF88E00F0A151 /* BuyRecoderListCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BuyRecoderListCell.h; sourceTree = "<group>"; };
 		1894142F2A9DF88E00F0A151 /* BuyRecoderListCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BuyRecoderListCell.m; sourceTree = "<group>"; };
+		18B35EFC2AB40BD0004287A0 /* ComontAlretViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ComontAlretViewController.h; sourceTree = "<group>"; };
+		18B35EFD2AB40BD0004287A0 /* ComontAlretViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ComontAlretViewController.m; sourceTree = "<group>"; };
 		18BA24852AA5C57900BA01EE /* RSATool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RSATool.h; sourceTree = "<group>"; };
 		18BA24862AA5C57900BA01EE /* RSATool.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RSATool.m; sourceTree = "<group>"; };
 		18BA24892AA5D48C00BA01EE /* WXPayManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WXPayManager.h; sourceTree = "<group>"; };
@@ -1023,10 +1031,21 @@
 				1870766E2A9F180500F15F7F /* NewPeopleWelfareViewController.m */,
 				187076722A9F32DC00F15F7F /* NoEnoughTimeViewController.h */,
 				187076712A9F32DC00F15F7F /* NoEnoughTimeViewController.m */,
+				18B35EFC2AB40BD0004287A0 /* ComontAlretViewController.h */,
+				18B35EFD2AB40BD0004287A0 /* ComontAlretViewController.m */,
 			);
 			path = AlertVC;
 			sourceTree = "<group>";
 		};
+		1872BD402AB052C50033E56F /* Model */ = {
+			isa = PBXGroup;
+			children = (
+				1872BD422AB053090033E56F /* UserDetailInfoModel.h */,
+				1872BD412AB053090033E56F /* UserDetailInfoModel.m */,
+			);
+			path = Model;
+			sourceTree = "<group>";
+		};
 		189414202A9D9FEC00F0A151 /* Model */ = {
 			isa = PBXGroup;
 			children = (
@@ -1048,6 +1067,7 @@
 		18C4754C2A8E0D9B006129C0 /* Set */ = {
 			isa = PBXGroup;
 			children = (
+				1872BD402AB052C50033E56F /* Model */,
 				18FB68F02A95F81700DA9ABC /* Share */,
 				184C8AD22A949D2B00F26650 /* appUpdate */,
 				184C8ACE2A94980C00F26650 /* CustomerWebViewController.h */,
@@ -1538,6 +1558,7 @@
 				181E84F22A8F0A9B00292B96 /* HelpDownScrollView.h in Headers */,
 				18FB69022A95F8AF00DA9ABC /* MessageModel.h in Headers */,
 				181E84FB2A8F57A500292B96 /* ChangeLogoViewController.h in Headers */,
+				1872BD442AB053090033E56F /* UserDetailInfoModel.h in Headers */,
 				18C4754F2A8E0DB5006129C0 /* MySetViewController.h in Headers */,
 				184C8ADD2A949DBD00F26650 /* HWVersionModel.h in Headers */,
 				181E84F72A8F451D00292B96 /* MineViewCell.h in Headers */,
@@ -1556,6 +1577,7 @@
 				18FB68FC2A95F8AF00DA9ABC /* HWShareViewController.h in Headers */,
 				184E0B672A9C4C0C00DE1571 /* VIPFunctForBuyView.h in Headers */,
 				18613D6D2A98AFC900C06B58 /* PackageListScrollView.h in Headers */,
+				18B35EFE2AB40BD0004287A0 /* ComontAlretViewController.h in Headers */,
 				1894142B2A9DF0EF00F0A151 /* PayRecoderListViewController.h in Headers */,
 				18D947262A970804003B5731 /* CellWithBtnView.h in Headers */,
 				183AE7C72A8CB39100B11CB0 /* SafeForKey.h in Headers */,
@@ -1866,6 +1888,7 @@
 				183AE6022A89CE3C00B11CB0 /* JSONValueTransformer.m in Sources */,
 				183AE6522A8A2CF000B11CB0 /* AFAutoPurgingImageCache.m in Sources */,
 				181E84FC2A8F57A500292B96 /* ChangeLogoViewController.m in Sources */,
+				18B35EFF2AB40BD0004287A0 /* ComontAlretViewController.m in Sources */,
 				A031DD7F27EC78C800909527 /* HWAgreementViewController.m in Sources */,
 				183AE64F2A8A2CF000B11CB0 /* UIImageView+AFNetworking.m in Sources */,
 				183AE6592A8A2CF000B11CB0 /* AFSecurityPolicy.m in Sources */,
@@ -1949,6 +1972,7 @@
 				184C8AD62A949D5900F26650 /* AboutViewController.m in Sources */,
 				183AE6062A89CE3C00B11CB0 /* JSONModelArray.m in Sources */,
 				183AE6562A8A2CF000B11CB0 /* AFURLSessionManager.m in Sources */,
+				1872BD432AB053090033E56F /* UserDetailInfoModel.m in Sources */,
 				183AE6092A89CE3C00B11CB0 /* JSONAPI.m in Sources */,
 				183AE6232A8A291400B11CB0 /* HWBuryPointModel.m in Sources */,
 				1810F9002AA1839C00322116 /* PhoneTimeInfoModel.m in Sources */,

BIN
双子星云手机.xcworkspace/xcuserdata/apple.xcuserdatad/UserInterfaceState.xcuserstate


+ 0 - 18
双子星云手机.xcworkspace/xcuserdata/apple.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -3,22 +3,4 @@
    uuid = "0D51A86C-5526-42B9-8ACC-2C9E51DC35D8"
    type = "0"
    version = "2.0">
-   <Breakpoints>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
-            uuid = "16E92C48-9C93-4326-A3C7-56879A14CB81"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "&#x53cc;&#x5b50;&#x661f;&#x4e91;&#x624b;&#x673a;/Vendor/AFNetworking/AFNetworking/AFURLRequestSerialization.m"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "1338"
-            endingLineNumber = "1338"
-            landmarkName = "-requestBySerializingRequest:withParameters:error:"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-   </Breakpoints>
 </Bucket>

+ 29 - 2
双子星云手机/AppDelegate/AppDelegate.m

@@ -12,8 +12,11 @@
 #import <TencentOpenAPI/TencentOAuth.h>
 #import <AlipaySDK/AlipaySDK.h>
 #import "WXPayManager.h"
+#import <CoreMotion/CoreMotion.h>
 
-@interface AppDelegate ()
+@interface AppDelegate (){
+    CMMotionManager *cmManager;
+}
 
 @end
 
@@ -40,9 +43,33 @@
     
     [WXApi registerApp:WXAPPid universalLink:wxuniversalLink];
     TencentOAuth *tencentOAuth =[[TencentOAuth alloc] initWithAppId:QQAPPid andUniversalLink:QQUniversalLink andDelegate:[QQLoginManager shareInstance]];
-   [QQLoginManager shareInstance].tencentOAuth = tencentOAuth;
+    [QQLoginManager shareInstance].tencentOAuth = tencentOAuth;
     
     [[UIButton appearance] setExclusiveTouch:YES];
+    
+    cmManager = [[CMMotionManager alloc] init];
+    if (cmManager.isAccelerometerAvailable){
+        HLog(@"\n-------摇一摇可用-----");
+    }else{
+        HLog(@"\n-------摇一摇不可用-----");
+    }
+    cmManager.accelerometerUpdateInterval = 0.1;
+    [cmManager startAccelerometerUpdates];
+    [cmManager startDeviceMotionUpdatesToQueue:[NSOperationQueue new] withHandler:^(CMDeviceMotion * _Nullable motion, NSError * _Nullable error) {
+        CMRotationRate rotationRate = motion.rotationRate;
+        CGFloat rotationRatex = rotationRate.x;
+        CGFloat rotationRatey = rotationRate.y;
+        CGFloat rotationRatez = rotationRate.z;
+        
+        if (rotationRatey > 7){
+            
+            BOOL haveOpenMask = [HWDataManager getBoolWithKey:Consn_Fanzhuan_Exit_app_Open];
+            if (haveOpenMask){
+                exit(0);/*强制退出app*/
+            }
+        }
+    }];
+    
     return YES;
 }
 

+ 3 - 0
双子星云手机/AppDelegate/Config/Const.h

@@ -49,6 +49,9 @@ UIKIT_EXTERN NSString *const Const_Mask_View_Open;
 /*进城隐藏模式 1:计算器  2:浏览器 其他默认计算器*/
 UIKIT_EXTERN NSString *const Const_Mask_View_Model;
 
+/*翻转关闭app是否打开 YES:打开  其他关闭*/
+UIKIT_EXTERN NSString *const Consn_Fanzhuan_Exit_app_Open;
+
 /*标记是否已过期 YES:已过期  其他未过期*/
 UIKIT_EXTERN NSString *const Const_Have_No_VaildTime;
 

+ 4 - 0
双子星云手机/AppDelegate/Config/Const.m

@@ -42,6 +42,10 @@ NSString *const Const_Volume_Info_Dict  = @"Const_Volume_Info_Dict";
 /*进城隐藏是否打开 1:打开  其他关闭*/
 NSString *const Const_Mask_View_Open  = @"Const_Mask_View_Open";
 
+
+/*翻转退出是否打开 1:打开  其他关闭*/
+NSString *const Consn_Fanzhuan_Exit_app_Open  = @"Fanzhuan_Exit_app_Open";
+
 /*进城隐藏模式 1:计算器  2:浏览器 其他默认计算器*/
 NSString *const Const_Mask_View_Model  = @"Const_Mask_View_Model";
 

+ 3 - 0
双子星云手机/AppDelegate/PrefixHeader.pch

@@ -88,11 +88,14 @@ isBangsScreen; \
 #define QQUniversalLink @"https://3695ec72e83ed102e1ab838d91022997.share2dlink.com/qq_conn/102020350"
 #define  AirPaySecret   @"shuangzixingiOSApp"
 
+#define User_Info_tableName(userName) [[NSString alloc] initWithFormat:@"User_Info_tableName_%@",userName];
+
 #pragma mark 音频相关宏定义
 #define USEAAC    NO
 #define AACTOPCM  YES
 #define USEAQAAC  NO
 #define USEOPENGL  YES
+#define USELOCALKEYBOARD  NO/*是否使用键盘透传*/
 
 #define P2PModelList_bg_tableName(userName) [[NSString alloc] initWithFormat:@"P2PModelList_bg_tableName_%@",userName];
 #define DB_HWBuryPointModelList_TableName   @"DB_HWBuryPointModelList_New"

+ 7 - 0
双子星云手机/AppDelegate/SceneDelegate.m

@@ -34,6 +34,8 @@
         //监听账号异地登陆销通知
         [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(accountLoginWithOtherDevice:)  name:AccountLoginWithOtherDeviceNotification  object:nil];
         [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(showExchangePhoneVC:)  name:PhoneNoVailTimeNotification  object:nil];
+        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(changeAccountOrLogout:)  name:ChangeAccountNotification  object:nil];
+        
         UIWindowScene *windowScene = (UIWindowScene *)scene;
         self.window = [[UIWindow alloc] initWithWindowScene:windowScene];
         self.window.frame = CGRectMake(0, 0, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height);
@@ -115,6 +117,7 @@
     NSInteger whetherPhoneStatus = [[dict objectForKey:@"whetherPhoneStatus"] integerValue];
     /*已过期,无有效使用时长 直接加载购买续费界面*/
     BuyOrReExchangeViewController *buyOrReExchangeVC = [[BuyOrReExchangeViewController alloc] init];
+    buyOrReExchangeVC.whetherPhoneStatus = whetherPhoneStatus;
     buyOrReExchangeVC.privilegeList = privilegeList;
     if (0 == whetherPhoneStatus){
         buyOrReExchangeVC.buyOrExchange = 0;
@@ -429,6 +432,10 @@
     }];
 }
 
+- (void)changeAccountOrLogout:(NSNotification*)not{
+    [self enterMainVCFromScene];
+}
+
 -(void)initAlertWithTitle:(NSString *_Nullable)title message:(NSString *)message sureActionBlock:(sureActionBlock)sureActionBlock {
     UIAlertController *alertController = [UIAlertController alertControllerWithTitle:title message:message preferredStyle:UIAlertControllerStyleAlert];
     UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:NSLocalizedString(@"other_comment_ok",nil) style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {

+ 22 - 0
双子星云手机/Assets.xcassets/Player/fanhui_you_icon.imageset/Contents.json

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

BIN
双子星云手机/Assets.xcassets/Player/fanhui_you_icon.imageset/fanhui_you_icon@2x.png


BIN
双子星云手机/Assets.xcassets/Player/fanhui_you_icon.imageset/fanhui_you_icon@3x.png


+ 22 - 0
双子星云手机/Assets.xcassets/Player/home_icon.imageset/Contents.json

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

BIN
双子星云手机/Assets.xcassets/Player/home_icon.imageset/home_icon@2x.png


BIN
双子星云手机/Assets.xcassets/Player/home_icon.imageset/home_icon@3x.png


+ 22 - 0
双子星云手机/Assets.xcassets/Player/houtai_icon.imageset/Contents.json

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

BIN
双子星云手机/Assets.xcassets/Player/houtai_icon.imageset/houtai_icon@2x.png


BIN
双子星云手机/Assets.xcassets/Player/houtai_icon.imageset/houtai_icon@3x.png


+ 22 - 0
双子星云手机/Assets.xcassets/Set/app_update.imageset/Contents.json

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

BIN
双子星云手机/Assets.xcassets/Set/app_update.imageset/编组 6@2x.png


BIN
双子星云手机/Assets.xcassets/Set/app_update.imageset/编组 6@3x.png


+ 22 - 0
双子星云手机/Assets.xcassets/Set/buy_recoder_icon.imageset/Contents.json

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

BIN
双子星云手机/Assets.xcassets/Set/buy_recoder_icon.imageset/编组 10@2x.png


BIN
双子星云手机/Assets.xcassets/Set/buy_recoder_icon.imageset/编组 10@3x.png


+ 22 - 0
双子星云手机/Assets.xcassets/Set/fanzhuan.imageset/Contents.json

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

BIN
双子星云手机/Assets.xcassets/Set/fanzhuan.imageset/编组 11@2x.png


BIN
双子星云手机/Assets.xcassets/Set/fanzhuan.imageset/编组 11@3x.png


+ 5 - 0
双子星云手机/Class/BuyPhone/BuyHome/BuyOrReExchangeViewController.h

@@ -19,6 +19,11 @@ NS_ASSUME_NONNULL_BEGIN
 /*云机到期会保留数据多少天*/
 @property (nonatomic ,assign)NSInteger expirationReminder;
 
+/**
+ * @brief  云机状态( 0:不存在 1:有效时间 2:有效时间不足 3:过期未回收 )   1、2为VIP状态  0、3 非VIP状态
+ */
+@property(nonatomic, assign)NSInteger whetherPhoneStatus;
+
 @end
 
 NS_ASSUME_NONNULL_END

+ 1 - 0
双子星云手机/Class/BuyPhone/BuyHome/BuyOrReExchangeViewController.m

@@ -187,6 +187,7 @@
 - (void)setBtnPressed{
     HLog(@"\n---右上角按钮点击-");
     MySetViewController *nextVC = [[MySetViewController alloc] init];
+    nextVC.whetherPhoneStatus = self.whetherPhoneStatus;
     [self.navigationController pushViewController:nextVC animated:YES];
 }
 

+ 17 - 1
双子星云手机/Class/Login/LoginView/ViewForPhoneAndSMS.m

@@ -87,7 +87,9 @@
     [mInputView.phoneNumInput setNl_maxLength:11];
     //    [self smsCutDownCheck];
     [mInputView.smsCodeBtn setEnabled:NO];
-    
+    [mInputView.smsInput addTarget:self
+                            action:@selector(smsInputChange)
+                  forControlEvents:(UIControlEventEditingChanged)];
     
     /*确认按钮*/
     okBtn = [[UIButton alloc] init];
@@ -552,6 +554,20 @@
     return YES;
 }
 
+- (void)smsInputChange{
+    if ([mInputView.phoneNumInput.text isEqualToString:@""]
+        || mInputView.phoneNumInput.text == nil
+        || [mInputView.smsInput.text isEqualToString:@""]
+        || mInputView.smsInput.text == nil)
+    {
+        [okBtn setEnabled:NO];
+        [okBtn setAlpha:0.5];
+    }else{
+        [okBtn setEnabled:YES];
+        [okBtn setAlpha:1];
+    }
+}
+
 - (void)hiddenKeyboard
 {
     [mInputView hiddenKeyboard];

+ 1 - 1
双子星云手机/Class/Set/MineViewCell.h

@@ -19,7 +19,7 @@ NS_ASSUME_NONNULL_BEGIN
 @property(nonatomic,strong)UILabel *titleLabel2;
 @property(nonatomic,strong)UIImageView *rightImage;
 @property(nonatomic, strong) CALayer* bgViewLayer;
-
+@property(nonatomic, strong) UISwitch *maskSwitch;
 @end
 
 NS_ASSUME_NONNULL_END

+ 18 - 1
双子星云手机/Class/Set/MineViewCell.m

@@ -17,6 +17,7 @@
 @synthesize titleLabel2;
 @synthesize rightImage;
 @synthesize lineView;
+@synthesize maskSwitch;
 
 - (void)awakeFromNib {
     [super awakeFromNib];
@@ -69,7 +70,19 @@
         make.right.mas_equalTo(-15.f);
         make.height.mas_equalTo(28);
         make.centerY.equalTo(cellBgView.mas_centerY);
-    }]; 
+    }];
+    
+    maskSwitch = [[UISwitch alloc] init];
+    [cellBgView addSubview:maskSwitch];
+    [maskSwitch mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.right.mas_equalTo(-18.f);
+        make.centerY.equalTo(cellBgView.mas_centerY);
+    }];
+    [maskSwitch setOnTintColor:HW13B2EBColor];
+    [maskSwitch addTarget:self action:@selector(maskSwitchPressed:) forControlEvents:(UIControlEventValueChanged)];
+
+    BOOL haveOpenMask = [HWDataManager getBoolWithKey:Consn_Fanzhuan_Exit_app_Open];
+    [maskSwitch setOn:haveOpenMask];
 
     /**标题*/
     titleLabel = [[UILabel alloc] init];
@@ -104,4 +117,8 @@
         make.height.mas_equalTo(1.f);
     }];
 }
+
+- (void)maskSwitchPressed:(UISwitch *)maskSwitch{
+    [HWDataManager setBoolWithKey:Consn_Fanzhuan_Exit_app_Open value:maskSwitch.on];
+}
 @end

+ 63 - 0
双子星云手机/Class/Set/Model/UserDetailInfoModel.h

@@ -0,0 +1,63 @@
+//
+//  UserDetailInfoModel.h
+//  VclustersGemini
+//
+//  Created by APPLE on 2020/10/9.
+//  Copyright © 2020 APPLE. All rights reserved.
+//
+
+#import "SuperModel.h"
+#import "BGFMDB.h" //添加该头文件,本类就具有了存储功能.
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface UserDetailInfoModel : SuperModel
+
+/**
+ * @brief 用户类型 1:登录用户  2:游客登录用户
+ */
+@property (nonatomic, assign) NSInteger userType;
+
+/**
+ * @brief  是否为第一次登录0:非第一次登陆  其他:第一次登陆
+ */
+@property(nonatomic, assign)NSInteger isFirstLogin;
+
+/**
+ * @brief  账号状态
+ */
+@property(nonatomic, assign)NSInteger type;
+
+/**
+ * @brief  用户名称
+ */
+@property(nonatomic, copy)NSString *userName;
+
+/**
+ * @brief  用户ID
+ */
+@property(nonatomic, copy)NSString *touristId;
+
+/**
+ * @brief  用户电话号码
+ */
+@property(nonatomic, copy)NSString *phone;
+
+/**
+ * @brief  过期时间
+ */
+@property(nonatomic, copy)NSString *exceptTime;
+
+/**
+ * @brief  过期时间
+ */
+@property(nonatomic, copy)NSString *exceptTimeStr;
+@end
+
+@interface UserDetailInfoDataModel : SuperModel
+
+@property(nonatomic, copy)UserDetailInfoModel *data;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 25 - 0
双子星云手机/Class/Set/Model/UserDetailInfoModel.m

@@ -0,0 +1,25 @@
+//
+//  UserDetailInfoModel.m
+//  VclustersGemini
+//
+//  Created by APPLE on 2020/10/9.
+//  Copyright © 2020 APPLE. All rights reserved.
+//
+
+#import "UserDetailInfoModel.h"
+
+@implementation UserDetailInfoModel
+
+
++ (BOOL)propertyIsOptional:(NSString *)propertyName{
+    return YES;
+}
+
+
+@end
+
+@implementation UserDetailInfoDataModel
+
+
+@end
+

+ 4 - 1
双子星云手机/Class/Set/MySetViewController.h

@@ -10,7 +10,10 @@
 NS_ASSUME_NONNULL_BEGIN
 
 @interface MySetViewController : BaseViewController
-
+/**
+ * @brief  云机状态( 0:不存在 1:有效时间 2:有效时间不足 3:过期未回收 )   1、2为VIP状态  0、3 非VIP状态
+ */
+@property(nonatomic, assign)NSInteger whetherPhoneStatus;
 @end
 
 NS_ASSUME_NONNULL_END

+ 166 - 35
双子星云手机/Class/Set/MySetViewController.m

@@ -16,9 +16,17 @@
 #import "CustomerWebViewController.h"
 #import "AboutViewController.h"
 #import "iPhone.h"
+#import "CloudPhoneAPI.h"
+#import "UserDetailInfoModel.h"
+#import "BuyVIPViewController.h"
+#import "PayRecoderListViewController.h"
+#import "ComontAlretViewController.h"
 
-@interface MySetViewController ()<HelpDownScrollViewDelegate,UITableViewDelegate,UITableViewDataSource>
-
+@interface MySetViewController ()<HelpDownScrollViewDelegate,UITableViewDelegate,UITableViewDataSource,ComontAlretViewControllerDelegate>
+{
+    UILabel *phoneLabel;
+    UILabel *vipTypeTipsLabel;
+}
 @property (nonatomic, strong, nullable) UITableView *tableView;
 
 @end
@@ -30,6 +38,45 @@
     // Do any additional setup after loading the view.
     
     [self drawAnyView];
+    
+    NSString* bg_tableName = nil;
+    NSDictionary *dictLogin = [[UseAccountManage shareInstance] getLoginInfo];
+    if (dictLogin && [[dictLogin allKeys] containsObject:@"touristId"])
+    {
+        NSString* username = [dictLogin objectForKey:@"touristId"];
+        bg_tableName = User_Info_tableName(username);
+        
+        NSArray* finfAlls = [UserDetailInfoModel bg_findAll:bg_tableName];
+         if (finfAlls && finfAlls.count >0) {
+             UserDetailInfoModel *model = finfAlls[0];
+             /*更新用户名称*/
+             [phoneLabel setText:model.userName];
+         }
+    }
+    
+    /*获取个人信息*/
+    [[UseAccountManage shareInstance] CommonPostCallBackCode:PostUserDetailInfo
+                                                      Params:[NSDictionary new]
+                                                     success:^(id  _Nonnull responseObject) {
+        UserDetailInfoDataModel *model = [[UserDetailInfoDataModel alloc] initWithDictionary:responseObject error:nil];
+        if (model.status.integerValue == 0){
+            /*内容用数据库更新到本地*/
+            if (bg_tableName){
+                model.data.bg_tableName = bg_tableName;
+                [model.data bg_cover];
+                
+                if (self.whetherPhoneStatus != 0){
+                    [self->vipTypeTipsLabel setText:[NSString stringWithFormat:@"%@%@",NSLocalizedString(@"my_set_no_time_top",nil),model.data.exceptTime]];
+                }
+            }
+        }else{
+            ;
+        }
+    }
+                                                     failure:^(NSError * _Nonnull error) {
+        ;
+    }];
+//http://testprivacy.phone.armclouding.com:11180/api/user/v1/user/getUserDetailInfo
 }
 
 - (void)drawAnyView{
@@ -55,7 +102,7 @@
     [headView setBackgroundColor:[UIColor clearColor]];
     
     UIImage *bgImage = [UIImage imageNamed:@"set_up_bg"];
-//    bgImage = [bgImage resizableImageWithCapInsets:UIEdgeInsetsMake(0, 0, 40, 80)];
+    //    bgImage = [bgImage resizableImageWithCapInsets:UIEdgeInsetsMake(0, 0, 40, 80)];
     
     UIImageView *bgImView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_W, 236.f)];
     [bgImView setImage:bgImage];
@@ -74,7 +121,7 @@
     
     NSDictionary *loginInfo = [[UseAccountManage shareInstance] getLoginInfo];
     /*用户名*/
-    UILabel *phoneLabel = [[UILabel alloc] init];
+    phoneLabel = [[UILabel alloc] init];
     [phoneLabel setFont:[UIFont boldSystemFontOfSize:18.f]];
     [phoneLabel setTextColor:[UIColor whiteColor]];
     
@@ -90,7 +137,7 @@
     }];
     
     /*下方会员视图*/
-//    vip_bg
+    //    vip_bg
     UIImageView *downBgView = [[UIImageView alloc] init];
     [downBgView setImage:[UIImage imageNamed:@"vip_bg"]];
     [headView addSubview:downBgView];
@@ -116,8 +163,13 @@
     }];
     
     /*VIP类型提示*/
-    UILabel *vipTypeTipsLabel = [[UILabel alloc] init];
-    [vipTypeTipsLabel setText:@"你当前为非会员,无法享受专属私密手机"];
+    vipTypeTipsLabel = [[UILabel alloc] init];
+    if (self.whetherPhoneStatus != 0){
+        [vipTypeTipsLabel setText:@""];
+    }else{
+        [vipTypeTipsLabel setText:NSLocalizedString(@"my_set_no_vip_tips",nil)];
+    }
+    
     [vipTypeTipsLabel setTextColor:[UIColor whiteColor]];
     [vipTypeTipsLabel setFont:[UIFont systemFontOfSize:12.f]];
     [downBgView addSubview:vipTypeTipsLabel];
@@ -131,7 +183,12 @@
     /*免费会员按钮*/
     UIButton *vipBtn = [[UIButton alloc] init];
     [vipBtn setBackgroundColor:[UIColor whiteColor]];
-    [vipBtn setTitle:@"免费领会员" forState:(UIControlStateNormal)];
+    if (self.whetherPhoneStatus != 0){
+        [vipBtn setTitle:NSLocalizedString(@"no_enough_time_exchange",nil) forState:(UIControlStateNormal)];
+    }else{
+        [vipBtn setTitle:NSLocalizedString(@"my_set_no_vip_open_vip",nil) forState:(UIControlStateNormal)];
+    }
+    
     [vipBtn setTitleColor:HW0A132BColor forState:(UIControlStateNormal)];
     [vipBtn.titleLabel setFont:[UIFont systemFontOfSize:13.f]];
     [vipBtn addTarget:self
@@ -145,9 +202,9 @@
         make.centerY.equalTo(downBgView.mas_centerY);
         make.height.mas_equalTo(31.f);
     }];
-    
+
     /*下方视图*/
-    HelpDownScrollView *helpDownScrollView = [[HelpDownScrollView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_W - 30, 96.f) withImageAry:@[@"icon-tubiao",@"icon-jincheng"] tilteAry:@[@"更换图标",@"进程隐藏"] numberOfLine:3];
+    HelpDownScrollView *helpDownScrollView = [[HelpDownScrollView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_W - 30, 96.f) withImageAry:@[@"icon-tubiao",@"icon-jincheng"] tilteAry:@[NSLocalizedString(@"my_set_no_change_logo",nil),NSLocalizedString(@"my_set_no_hidden_app",nil)] numberOfLine:3];
     helpDownScrollView.presedDelegate = self;
     [headView addSubview:helpDownScrollView];
     [helpDownScrollView mas_makeConstraints:^(MASConstraintMaker *make) {
@@ -213,7 +270,7 @@
 
 - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
     
-    return 4;
+    return 7;
 }
 
 
@@ -234,9 +291,10 @@
     [cell.titleLabel2 setHidden:YES];
     [cell.rightImage setHidden:NO];
     [cell.lineView setHidden:NO];
+    [cell.maskSwitch setHidden:YES];
     if (row == 0){
-        [cell.titleLabel setText:@"邀请好友"];
-        [cell.titleLabel2 setText:@"邀请好友送会员"];
+        [cell.titleLabel setText:NSLocalizedString(@"my_set_no_invite_friend",nil)];
+        [cell.titleLabel2 setText:NSLocalizedString(@"my_set_no_invite_friend_get_vip",nil)];
         [cell.mImageView setImage:[UIImage imageNamed:@"icon-yaoqing"]];
         [cell.titleLabel2 setHidden:NO];
         /*上圆角*/
@@ -249,15 +307,25 @@
         maskLayer.path = maskPath.CGPath;
         cell.bgViewLayer = maskLayer;
         cell.cellBgView.layer.mask = cell.bgViewLayer;
-        
     }else if (row == 1){
-        [cell.titleLabel setText:@"检测更新"];
-        [cell.mImageView setImage:[UIImage imageNamed:@"icon-gengxin"]];
+        [cell.titleLabel setText:NSLocalizedString(@"my_set_no_fanzhuan_exit",nil)];
+        [cell.mImageView setImage:[UIImage imageNamed:@"fanzhuan"]];
+        [cell.rightImage setHidden:YES];
+        [cell.maskSwitch setHidden:NO];
     }else if (row == 2){
-        [cell.titleLabel setText:@"联系客服"];
-        [cell.mImageView setImage:[UIImage imageNamed:@"icon-kefu"]];
+        [cell.titleLabel setText:NSLocalizedString(@"my_set_no_check_update",nil)];
+        [cell.mImageView setImage:[UIImage imageNamed:@"app_update"]];
     }else if (row == 3){
-        [cell.titleLabel setText:@"退出账号"];
+        [cell.titleLabel setText:NSLocalizedString(@"my_set_no_connect_kefu",nil)];
+        [cell.mImageView setImage:[UIImage imageNamed:@"icon-kefu"]];
+    }else if (row == 4){
+        [cell.titleLabel setText:NSLocalizedString(@"my_set_no_buy_recoder",nil)];
+        [cell.mImageView setImage:[UIImage imageNamed:@"buy_recoder_icon"]];
+    }else if (row == 5){/*重启空间*/
+        [cell.titleLabel setText:NSLocalizedString(@"my_set_no_restart_phone",nil)];
+        [cell.mImageView setImage:[UIImage imageNamed:@"icon-gengxin"]];
+    }else if (row == 6){
+        [cell.titleLabel setText:NSLocalizedString(@"my_set_no_logout",nil)];
         [cell.mImageView setImage:[UIImage imageNamed:@"icon-tuichu"]];
         [cell.rightImage setHidden:YES];
         /*下圆角*/
@@ -284,10 +352,25 @@
     [tableView deselectRowAtIndexPath:indexPath animated:YES];
     
     NSInteger row = indexPath.row;
-    
-    if (2 == row){
+    if (0 == row){
         CustomerWebViewController *vc = [[CustomerWebViewController alloc] init];
-        vc.titleStr = @"隐私空间客服";
+        vc.needHidenNav = YES;
+        NSDictionary *dictLogin = [[UseAccountManage shareInstance] getLoginInfo];
+        if (dictLogin && [[dictLogin allKeys] containsObject:@"token"])
+        {
+            NSString *tokenStr = [dictLogin objectForKey:@"token"];
+            NSString *url = [NSString stringWithFormat:@"http://192.168.11.32:11180/cloud/privacy/#/pages/invitation/index?token=%@&iosVersionNumber=%@", tokenStr,[iPhone appVersion]];
+            vc.webUrl = url;
+            [self.navigationController pushViewController:vc animated:YES];
+        }
+    }else if (1 == row){
+        /*翻转退出*/
+    }else if (2 == row){
+        AboutViewController *vc = [[AboutViewController alloc] init];
+        [self.navigationController pushViewController:vc animated:YES];
+    }else if (3 == row){
+        CustomerWebViewController *vc = [[CustomerWebViewController alloc] init];
+        vc.titleStr = NSLocalizedString(@"my_set_no_app_kefu",nil);
         NSDictionary *dictLogin = [[UseAccountManage shareInstance] getLoginInfo];
         if (dictLogin && [[dictLogin allKeys] containsObject:@"token"])
         {
@@ -299,22 +382,70 @@
             vc.webUrl = url;
             [self.navigationController pushViewController:vc animated:YES];
         }
-    }else if (1 == row){
-        AboutViewController *vc = [[AboutViewController alloc] init];
-        [self.navigationController pushViewController:vc animated:YES];
+    }
+    else if (4 == row){/*购买记录*/
+        /*跳入订单界面*/
+        PayRecoderListViewController *nextVC = [[PayRecoderListViewController alloc] init];
+        
+        [self.navigationController pushViewController:nextVC animated:YES];
+    }else if (5 == row){/*重启空间*/
+        NSArray *phoneList = [UseAccountManage shareInstance].cloudPhoneListModel.diskInfo;
+        
+        if (!phoneList || phoneList.count == 0){
+            [[iToast makeText:NSLocalizedString(@"my_set_no_restart_phone_tips_no_vip",nil)] show];
+            return;
+        }
+        
+        /*弹窗提示重启*/
+        ComontAlretViewController *nextVC = [[ComontAlretViewController alloc] initWithTiTle:NSLocalizedString(@"my_set_no_restart_phone_tips",nil)
+                                                                                         msg:nil
+                                                                                 cancelTitle:NSLocalizedString(@"other_cancel",nil)
+                                                                                     okTitle:NSLocalizedString(@"my_set_no_restart_phone_btn_ok",nil)];
+        nextVC.modalPresentationStyle = UIModalPresentationCustom;
+        nextVC.delegate = self;
+        [self presentViewController:nextVC animated:YES completion:^{
+            nextVC.view.superview.backgroundColor = [UIColor clearColor];
+        }];
+    }else if (6 == row){/*退出登录*/
+        [self.navigationController popToRootViewControllerAnimated:NO];
+        [[UseAccountManage shareInstance] logout];
     }
 }
 
+- (void)okBtnClickPressed{
+    /*重启云手机*/
+    [self showNewIndicatorWithCanBack:YES canTouch:NO];
+    CloudPhoneModel *model = [UseAccountManage shareInstance].cloudPhoneListModel.diskInfo.firstObject;
+    [[UseAccountManage shareInstance] CommonGetWithCallBackCode:GetPhonereboot
+                                                     Parameters:@{@"userCardId":[NSNumber numberWithInteger:model.userCardId]}
+                                                        success:^(id  _Nonnull responseObject) {
+                                                            HLog(@"%@", responseObject);
+                                                          [self removeNewIndicator];
+
+                                                          SuperModel *model = [[SuperModel alloc] initWithDictionary:responseObject error:nil];
+
+                                                           if (model.status && model.status.integerValue == 0) {
+                                                               if (model.msg.length > 0){
+                                                                   [[iToast makeText:model.msg] show];
+                                                               }else{
+                                                                   [[iToast makeText:NSLocalizedString(@"my_set_no_restart_phone_ok_tips",nil)] show];
+                                                               }
+                                                           }
+                                                           else
+                                                           {
+                                                               [[iToast makeText:model.msg] show];
+                                                           }
+
+                                                        } failure:^(NSError * _Nonnull error) {
+                                                          HLog(@"%@", error);
+                                                            [[iToast makeText:@"网络异常,请稍后重试!"] show];
+                                                            [self removeNewIndicator];
+                                                        }];
+}
+
 - (void)vipBtnPressed{
-    CustomerWebViewController *vc = [[CustomerWebViewController alloc] init];
-    vc.needHidenNav = YES;
-    NSDictionary *dictLogin = [[UseAccountManage shareInstance] getLoginInfo];
-    if (dictLogin && [[dictLogin allKeys] containsObject:@"token"])
-    {
-        NSString *tokenStr = [dictLogin objectForKey:@"token"];
-        NSString *url = [NSString stringWithFormat:@"http://192.168.11.32:11180/cloud/privacy/#/pages/invitation/index?token=%@&iosVersionNumber=%@", tokenStr,[iPhone appVersion]];
-        vc.webUrl = url;
-        [self.navigationController pushViewController:vc animated:YES];
-    }
+    /*跳转购买界面*/
+    BuyVIPViewController *nextVC = [[BuyVIPViewController alloc] init];
+    [self.navigationController pushViewController:nextVC animated:YES];
 }
 @end

+ 25 - 0
双子星云手机/CloudPlayer/AlertVC/ComontAlretViewController.h

@@ -0,0 +1,25 @@
+//
+//  ComontAlretViewController.h
+//  隐私保护
+//
+//  Created by APPLE on 2023/8/30.
+//
+
+#import "BaseViewController.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@protocol ComontAlretViewControllerDelegate <NSObject>
+
+- (void)okBtnClickPressed;
+
+@end
+
+@interface ComontAlretViewController : BaseViewController
+@property (nonatomic,weak)id <ComontAlretViewControllerDelegate> delegate;
+
+- (id)initWithTiTle:(NSString *)title msg:(NSString *)msg cancelTitle:(NSString *)cancelTitle okTitle:(NSString *)okTitle;
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 192 - 0
双子星云手机/CloudPlayer/AlertVC/ComontAlretViewController.m

@@ -0,0 +1,192 @@
+//
+//  ComontAlretViewController.m
+//  隐私保护
+//
+//  Created by APPLE on 2023/8/30.
+//
+
+#import "ComontAlretViewController.h"
+#import <Masonry.h>
+
+@interface ComontAlretViewController (){
+    NSString *titleStr;
+    NSString *msgStr;
+    NSString *cancelTitleStr;
+    NSString *okTitleStr;
+}
+
+@end
+
+@implementation ComontAlretViewController
+@synthesize delegate;
+
+- (id)initWithTiTle:(NSString *)title msg:(NSString *)msg cancelTitle:(NSString *)cancelTitle okTitle:(NSString *)okTitle{
+    self = [super init];
+    
+    titleStr = title;
+    msgStr = msg;
+    cancelTitleStr = cancelTitle;
+    okTitleStr = okTitle;
+    
+    return  self;
+}
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    // Do any additional setup after loading the view.
+    
+    [self drawAnyView];
+}
+
+- (void)drawAnyView{
+    [self.view setBackgroundColor:HW000000Color60];
+    
+    [self.toolBar setHidden:YES];
+    [self.navigationBar setHidden:YES];
+        
+    UIView *bgView = [[UIView alloc] init];
+    [bgView setBackgroundColor:[UIColor whiteColor]];
+    [bgView.layer setCornerRadius:8.f];
+    
+    [self.view addSubview:bgView];
+    [bgView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.centerY.equalTo(self.view.mas_centerY).offset(10*HAUTOSCALE);
+        make.centerX.equalTo(self.view.mas_centerX);
+        make.width.mas_equalTo(300.f);
+    }];
+    
+    /*主标题*/
+    UILabel *titleLabel = [[UILabel alloc] init];
+    [titleLabel setTextColor:HW0A132BColor];
+    [titleLabel setFont:[UIFont boldSystemFontOfSize:16.f]];
+    [titleLabel setTextAlignment:(NSTextAlignmentCenter)];
+    [titleLabel setText:titleStr];
+    [titleLabel setNumberOfLines:0];
+    
+    if (titleStr.length > 0){
+        [bgView addSubview:titleLabel];
+        [titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.left.mas_equalTo(8.f);
+            make.right.mas_equalTo(-8.f);
+            make.top.mas_equalTo(30.f);
+        }];
+    }
+    
+    /*副标题*/
+    UILabel *msgLabel = [[UILabel alloc] init];
+    [msgLabel setTextColor:HW333333Color];
+    [msgLabel setFont:[UIFont systemFontOfSize:15.f]];
+    [msgLabel setTextAlignment:(NSTextAlignmentCenter)];
+    [msgLabel setText:msgStr];
+    [msgLabel setNumberOfLines:0];
+    
+    if (msgStr.length > 0){
+        [bgView addSubview:msgLabel];
+        [msgLabel mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.left.mas_equalTo(8.f);
+            make.right.mas_equalTo(-8.f);
+            if (titleStr.length > 0){
+                make.top.equalTo(titleLabel.mas_bottom).offset(15.f);
+            }else{
+                make.top.mas_equalTo(30.f);
+            }
+        }];
+    }
+    
+    /*双按钮*/
+    /*取消*/
+    
+    /*取消按钮*/
+    UIButton *cancelBtn = [[UIButton alloc] init];
+    cancelBtn.frame = CGRectMake(0, 0, 115, 48.f);
+    CGFloat w_btn = 200;
+    if (okTitleStr.length > 0){
+        w_btn = 115;
+    }
+    
+    // gradient
+    CAGradientLayer *gl = [CAGradientLayer layer];
+    gl.frame = CGRectMake(0,0,w_btn,48.f);
+    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)];
+    
+    [cancelBtn.layer addSublayer:gl];
+    [cancelBtn addTarget:self action:@selector(cancelBtnClick) forControlEvents:(UIControlEventTouchUpInside)];
+    [cancelBtn setTitle:cancelTitleStr forState:(UIControlStateNormal)];
+    [cancelBtn setTitleColor:[UIColor whiteColor] forState:(UIControlStateNormal)];
+    [cancelBtn.titleLabel setFont:[UIFont systemFontOfSize:16.f]];
+    [cancelBtn.layer setCornerRadius:8.f];
+    cancelBtn.clipsToBounds = YES;
+    [bgView addSubview:cancelBtn];
+    [cancelBtn mas_makeConstraints:^(MASConstraintMaker *make) {
+        if (okTitleStr.length > 0){
+            make.left.mas_equalTo(24);
+        }else{
+            make.centerX.equalTo(bgView.mas_centerX);
+        }
+        if (msgStr.length > 0){
+            make.top.equalTo(msgLabel.mas_bottom).offset(15.f);
+        }else{
+            make.top.equalTo(titleLabel.mas_bottom).offset(25.f);
+        }
+        
+        make.width.mas_equalTo(w_btn);
+        make.bottom.equalTo(bgView.mas_bottom).offset(-30.f);
+        make.height.mas_equalTo(48.f);
+    }];
+
+    if (okTitleStr.length > 0){
+        /*残忍拒绝*/
+        UIButton *okBtn = [[UIButton alloc] init];
+        [okBtn addTarget:self action:@selector(okBtnClick) forControlEvents:(UIControlEventTouchUpInside)];
+        [okBtn setTitle:okTitleStr forState:(UIControlStateNormal)];
+        [okBtn setTitleColor:HW0A132BColor forState:(UIControlStateNormal)];
+        [okBtn.titleLabel setFont:[UIFont systemFontOfSize:16.f]];
+        [okBtn.layer setCornerRadius:8.f];
+        [okBtn setBackgroundColor:HWE3E8F1Color];
+        okBtn.clipsToBounds = YES;
+        [bgView addSubview:okBtn];
+        [okBtn mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.right.mas_equalTo(-24.f);
+            make.width.mas_equalTo(w_btn);
+            make.top.equalTo(cancelBtn.mas_top);
+            make.height.mas_equalTo(48.f);
+        }];
+    }
+}
+
+//- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{
+//    [self dismissViewControllerAnimated:YES completion:^{
+//        ;
+//    }];
+//}
+
+- (void)cancelBtnClick{
+    [self dismissViewControllerAnimated:YES completion:^{
+        ;
+    }];
+}
+
+- (void)okBtnClick{
+    [self dismissViewControllerAnimated:YES completion:^{
+        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+            if ([self->delegate respondsToSelector:@selector(okBtnClickPressed)]){
+                [self->delegate okBtnClickPressed];
+            }
+        });
+    }];
+}
+
+/*
+#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.
+}
+*/
+
+@end

+ 20 - 0
双子星云手机/CloudPlayer/CloudPhoneAPI.h

@@ -270,4 +270,24 @@
 
 #define GetPayOrderAPI            @"/api/pay/v1/order/pullOrder"/*拉起订单支付*/
 
+/*获取用户基本信息  post请求
+ 输入参数          phone     NSString    电话号码
+                 code       NSString   设备唯一标识符
+                  
+ 返回数据模型 SuperModel*/
+#define PostUserDetailInfo            @"/api/user/v1/user/getUserDetailInfo"
+
+/*获取用户基本信息  post请求
+ 输入参数          phone     NSString    电话号码
+                 code       NSString   设备唯一标识符
+                  
+ 返回数据模型 SuperModel*/
+#define PostListOrderInfo            @"/api/pay/v1/order/listOrderInfo"
+
+/*获取用户基本信息  Get请求
+ 输入参数          userCardId     int    云手机ID
+                  
+ 返回数据模型 SuperModel*/
+#define GetPhonereboot               @"/api/resources/api/usercard/reboot"
+
 #endif /* CloudPhoneAPI_h */

+ 1 - 1
双子星云手机/CloudPlayer/PlayerViewController+RBD.m

@@ -170,7 +170,7 @@
         }else if(CODE == 5201 || CODE == 5200) {
             double nowTime = [[NSDate date] timeIntervalSince1970];
             
-            if (nowTime - self.deviceModel.startGetRBDTime < 30 - 1)
+            if (nowTime - self.deviceModel.startGetRBDTime < 300 - 1)
             {
                 if ([FLSocketManager shareManager].fl_socketStatus == FLSocketStatusReceived || [FLSocketManager shareManager].fl_socketStatus == FLSocketStatusConnected){
                     self.chaofenDeviceModel = self.deviceModel;

+ 65 - 35
双子星云手机/CloudPlayer/PlayerViewController.mm

@@ -64,7 +64,7 @@ typedef enum : NSUInteger {
 //#include "socket.h"
 
 
-
+CGFloat w_h_rate;
 
 PlayerViewController * _Nullable mySelf;
 
@@ -116,6 +116,8 @@ UITextFieldDelegate>
     
     UITextField *hidenTextField;
     NSString *hidenTextFieldOldStr;
+    
+    PhoneTimeInfoDataModel *phoneTimeInfoDataModel;
 }
 @property (nonatomic, strong, nullable) RCVideoRecoderManager *recoderManager;
 @property (nonatomic, strong, nullable) RCAudioRecoderMamager *audioRecoderMamager;
@@ -166,25 +168,25 @@ UITextFieldDelegate>
     [[UseAccountManage shareInstance] CommonGetWithCallBackCode:GetUserPhoneInfoAPI
                                                      Parameters:nil
                                                         success:^(id  _Nonnull responseObject) {
-        PhoneTimeInfoDataModel *model = [[PhoneTimeInfoDataModel alloc] initWithDictionary:responseObject error:nil];
-        if (model.status.intValue == 0){
+        self->phoneTimeInfoDataModel = [[PhoneTimeInfoDataModel alloc] initWithDictionary:responseObject error:nil];
+        if (self->phoneTimeInfoDataModel.status.intValue == 0){
             
-            if (model.data.experienceTime > 0){/*弹窗赠送信息*/
+            if (self->phoneTimeInfoDataModel.data.experienceTime > 0){/*弹窗赠送信息*/
                 ;
             }else{
-                if (model.data.whetherPhoneStatus == 0){/*云机被回收 直接开通*/
+                if (self->phoneTimeInfoDataModel.data.whetherPhoneStatus == 0){/*云机被回收 直接开通*/
                     [HWDataManager setBoolWithKey:Const_Have_No_VaildTime value:YES];
                     [[NSNotificationCenter defaultCenter] postNotificationName:PhoneNoVailTimeNotification object:nil userInfo:[responseObject safeDictionaryForKey:@"data"]];
-                }else if (model.data.whetherPhoneStatus == 3){/*云机未被回收 无有效时间  续费*/
+                }else if (self->phoneTimeInfoDataModel.data.whetherPhoneStatus == 3){/*云机未被回收 无有效时间  续费*/
                     [HWDataManager setBoolWithKey:Const_Have_No_VaildTime value:YES];
                     [[NSNotificationCenter defaultCenter] postNotificationName:PhoneNoVailTimeNotification object:nil userInfo:[responseObject safeDictionaryForKey:@"data"]];
-                }else if (model.data.whetherPhoneStatus == 2){/*没有充足的有效时间*/
+                }else if (self->phoneTimeInfoDataModel.data.whetherPhoneStatus == 2){/*没有充足的有效时间*/
                     [HWDataManager setBoolWithKey:Const_Have_No_VaildTime value:NO];
                     /*没有充足的有效时间*/
                     NoEnoughTimeViewController *nextVC = [[NoEnoughTimeViewController alloc] init];
                     nextVC.delegate = self;
-                    nextVC.privilegeList = model.data.privilegeList;
-                    nextVC.expirationReminder = model.data.expirationReminder;
+                    nextVC.privilegeList = self->phoneTimeInfoDataModel.data.privilegeList;
+                    nextVC.expirationReminder = self->phoneTimeInfoDataModel.data.expirationReminder;
                     nextVC.modalPresentationStyle = UIModalPresentationCustom;
                     [self presentViewController:nextVC animated:YES completion:^{
                         nextVC.view.superview.backgroundColor = [UIColor clearColor];
@@ -272,6 +274,10 @@ UITextFieldDelegate>
                             
                             self.isNeedRecyclResource = YES;
                         }
+                    }else{
+                        [[P2PDataManager shareInstance] deleteRecoderWithPhoneID:self->deviceModel.phoneId];
+                        /*主动超分*/
+                        [self extensionPhoneGetRBD];
                     }
                 }else{
                     /*主动超分*/
@@ -491,9 +497,15 @@ UITextFieldDelegate>
 //                        [self.commandChannelManager rc_sendData:[RCCommandHelp askControllcommandWithUseName:selfUseName]];
 //                    }
                     
-                    /*开启输入法透传*/
-                    NSString *dataStr = [RCCommandHelp commandOpenLoaclKeyboad];
-                    [self.commandChannelManager rc_sendData:dataStr];
+//                    if (USELOCALKEYBOARD){
+//                        /*开启输入法透传*/
+//                        NSString *dataStr = [RCCommandHelp commandOpenLoaclKeyboad];
+//                        [self.commandChannelManager rc_sendData:dataStr];
+//                    }else{
+//                        /*关闭输入法透传*/
+//                        NSString *dataStr = [RCCommandHelp commandCloseLoaclKeyboad];
+//                        [self.commandChannelManager rc_sendData:dataStr];
+//                    }
                 });
             }
         } receive:^(id message, FLSocketCloudPhoneReceiveType type) {
@@ -1358,12 +1370,19 @@ UITextFieldDelegate>
     EventState state = event;
     if (0 == state)/*横屏*/
     {
-        isLan = YES;
-        mySelf->mPlayerView.isLan = YES;
-        [[VclCrash sharedInstance] writeContent:[NSString stringWithFormat:@"______________视频数据_______"]];
+        if (USELOCALKEYBOARD){
+            isLan = YES;
+            /*横屏处理*/
+            [self setDeviceOrientation:(UIDeviceOrientationLandscapeLeft)];
+            HLog(@"\n---000000--横屏--000000-----");
+        }else{
+            /*横屏处理*/
+            isLan = NO;
+            [self setDeviceOrientation:(UIDeviceOrientationPortrait)];
+            HLog(@"\n---000000--横屏--000000-----");
+        }
         
-        /*横屏处理*/
-        [self setDeviceOrientation:(UIDeviceOrientationLandscapeLeft)];
+        mySelf->mPlayerView.isLan = YES;
         HLog(@"\n---000000--横屏--000000-----");
     }
     else if (1 == state)/*竖屏*/
@@ -1801,6 +1820,7 @@ NSDate *lastVideoTome;/*上一帧数据时间*/
     HLog(@"__________%s__________",__func__);
     [[UIApplication sharedApplication] setStatusBarHidden:NO];
     MySetViewController *nextVC = [[MySetViewController alloc] init];
+    nextVC.whetherPhoneStatus = phoneTimeInfoDataModel.data.whetherPhoneStatus;
     [self.navigationController pushViewController:nextVC animated:YES];
     self.isNeedRecyclResource = NO;
 }
@@ -2511,17 +2531,22 @@ static int  couneeee = 0;
 #pragma mark - opengl渲染
 - (void)showImageOpenglWithCIImage:(CIImage *)ciImage
 {
-//    CGFloat    tempRate   = ciImage.extent.size.width/ciImage.extent.size.height;
-//    if (w_h_rate != tempRate)
-//    {
-////        ksharedAppDelegate.couldPhone_W_PHONE = ciImage.extent.size.width;
-////        ksharedAppDelegate.couldPhone_H_PHONE = ciImage.extent.size.height;
-//
-//        w_h_rate = tempRate;
-//        mainBlock(^{
-//            [self updatePlayViewRate:tempRate];
-//        });
-//    }
+    if (USELOCALKEYBOARD){
+        ;
+    }else{
+        CGFloat    tempRate   = ciImage.extent.size.width/ciImage.extent.size.height;
+        if (w_h_rate != tempRate)
+        {
+    //        ksharedAppDelegate.couldPhone_W_PHONE = ciImage.extent.size.width;
+    //        ksharedAppDelegate.couldPhone_H_PHONE = ciImage.extent.size.height;
+    
+            w_h_rate = tempRate;
+            mainBlock(^{
+                [self updatePlayViewRate:tempRate];
+            });
+        }
+    }
+
     [mPlayerView glkShowImage:ciImage];
 }
 
@@ -2535,13 +2560,18 @@ static int  couneeee = 0;
     mainBlock(^{
         if (image)
         {
-//            if (w_h_rate != tempRate)
-//            {
-////                ksharedAppDelegate.couldPhone_W_PHONE = ciImage.extent.size.width;
-////                ksharedAppDelegate.couldPhone_H_PHONE = ciImage.extent.size.height;
-//
-//                [self updatePlayViewRate:tempRate];
-//            }
+            if (USELOCALKEYBOARD){
+                ;
+            }else{
+                if (w_h_rate != tempRate)
+                {
+    //                ksharedAppDelegate.couldPhone_W_PHONE = ciImage.extent.size.width;
+    //                ksharedAppDelegate.couldPhone_H_PHONE = ciImage.extent.size.height;
+
+                    [self updatePlayViewRate:tempRate];
+                }
+            }
+
             self->mPlayerView.showImageView.image = image;
         }
     });

+ 13 - 0
双子星云手机/CloudPlayer/RCCommandHelp.h

@@ -60,12 +60,24 @@ NS_ASSUME_NONNULL_BEGIN
 + (NSString *)commandOpenLoaclKeyboad;
 
 /**
+* @brief 使用云手机键盘
+*
+*/
++ (NSString *)commandCloseLoaclKeyboad;
+
+/**
 * @brief 关闭云手机键盘透传
 *
 */
 + (NSString *)commandClosePhoneKeyboad;
 
 /**
+* @brief 设置云手机默认帧率
+*
+*/
++ (NSString *)commandSetFps;
+
+/**
 * @brief 发送透传文字给云手机/输入或者删除
 *
 * @param  str 输入的内容 为nil时为删除
@@ -125,6 +137,7 @@ NS_ASSUME_NONNULL_BEGIN
  */
 + (NSString *)commandConnectedWithDeviceId:(NSString *)deviceid;
 
+
 /**
  * @brief 控制权---查询控制权情况
  */

+ 313 - 32
双子星云手机/CloudPlayer/RCCommandHelp.m

@@ -34,6 +34,260 @@
     return resultStr;
 }
 
+//#pragma -mark- 新设备控制指令
+//+ (NSString *)mutTapCommand500DownWithTouches:(NSArray *)touches
+//                                showImageView:(UIImageView *)showImageView
+//                                        isLan:(BOOL)isLan
+//{
+//    /*比列换算*/
+////    CGFloat ratex = (showImageView.frame.size.width > showImageView.frame.size.height)?(H_PHONE/showImageView.frame.size.width):(W_PHONE/showImageView.frame.size.width);
+////    CGFloat ratey = (showImageView.frame.size.height > showImageView.frame.size.width)?(H_PHONE/showImageView.frame.size.height):(W_PHONE/showImageView.frame.size.height);
+////    CGFloat ratex = W_PHONE/showImageView.frame.size.width;
+////    CGFloat ratey = H_PHONE/showImageView.frame.size.height;
+//
+//    CGFloat ratex = ksharedAppDelegate.couldPhone_W_PHONE/showImageView.frame.size.width;
+//    CGFloat ratey = ksharedAppDelegate.couldPhone_H_PHONE/showImageView.frame.size.height;
+//
+//
+//    NSString *pointList = @"";
+//    for (NSInteger nfori = 0;nfori < [touches count];nfori++)
+//    {
+//        UITouch *touch = [touches objectAtIndex:nfori];
+//        CGPoint  lastPoint = [touch locationInView:showImageView];
+//
+//        /*换算后的坐标*/
+////        CGFloat x = lastPoint.x*ratex;
+////        CGFloat y = lastPoint.y*ratey;
+//        CGFloat x = isLan?(lastPoint.y*ratey):(lastPoint.x*ratex);
+//        CGFloat y = isLan?((showImageView.frame.size.width - lastPoint.x)*ratex):lastPoint.y*ratey;
+//
+//        pointList = [pointList stringByAppendingString:[NSString stringWithFormat:@"{\"action\":%ld,\"x\":\"%f\",\"y\":\"%f\"}",(long)nfori,x,y]];
+//    }
+//
+//    pointList = [pointList stringByReplacingOccurrencesOfString:@"}{" withString:@"},{"];
+//
+//    NSString *dataStr = [NSString stringWithFormat:@"{\"data\":{\"fingerList\":[%@]},\"type\":\"morePortionDown\"}",pointList];
+//
+//    if (USENEWCONTROLLCOMMONDNO500)
+//    {
+////        dataStr = [CommondToStr commondAppendingHeadAndEndStrWithSourStr:dataStr];
+//    }
+//    else
+//    {
+//        dataStr = [RCCommandHelp commandAppending00StringWithSourStr:dataStr];
+//    }
+//
+//    return dataStr;
+//}
+//
+//+ (NSString *)mutTapCommand500UpWithTouches:(NSArray *)touches
+//                              showImageView:(UIImageView *)showImageView
+//                                      isLan:(BOOL)isLan
+//{
+//    /*比列换算*/
+////    CGFloat ratex = (showImageView.frame.size.width > showImageView.frame.size.height)?(H_PHONE/showImageView.frame.size.width):(W_PHONE/showImageView.frame.size.width);
+////    CGFloat ratey = (showImageView.frame.size.height > showImageView.frame.size.width)?(H_PHONE/showImageView.frame.size.height):(W_PHONE/showImageView.frame.size.height);
+////    CGFloat ratex = W_PHONE/showImageView.frame.size.width;
+////    CGFloat ratey = H_PHONE/showImageView.frame.size.height;
+//    CGFloat ratex = ksharedAppDelegate.couldPhone_W_PHONE/showImageView.frame.size.width;
+//    CGFloat ratey = ksharedAppDelegate.couldPhone_H_PHONE/showImageView.frame.size.height;
+//
+//    NSString *pointList = @"";
+//    for (NSInteger nfori = 0;nfori < [touches count];nfori++)
+//    {
+//        UITouch *touch = [touches objectAtIndex:nfori];
+//        CGPoint  lastPoint = [touch locationInView:showImageView];
+//
+//        /*换算后的坐标*/
+////        CGFloat x = lastPoint.x*ratex;
+////        CGFloat y = lastPoint.y*ratey;
+//        CGFloat x = isLan?(lastPoint.y*ratey):(lastPoint.x*ratex);
+//        CGFloat y = isLan?((showImageView.frame.size.width - lastPoint.x)*ratex):lastPoint.y*ratey;
+//
+//        pointList = [pointList stringByAppendingString:[NSString stringWithFormat:@"{\"action\":%ld,\"x\":\"%f\",\"y\":\"%f\"}",(long)nfori,x,y]];
+//    }
+//
+//    pointList = [pointList stringByReplacingOccurrencesOfString:@"}{" withString:@"},{"];
+//
+//    NSString *dataStr = [NSString stringWithFormat:@"{\"data\":{\"fingerList\":[%@]},\"type\":\"morePortionUp\"}",pointList];
+//
+//
+//    if (USENEWCONTROLLCOMMONDNO500)
+//    {
+////        dataStr = [self commondAppendingHeadAndEndStrWithSourStr:dataStr];
+//    }
+//    else
+//    {
+//        dataStr = [self commandAppending00StringWithSourStr:dataStr];
+//    }
+//
+//    return dataStr;
+//}
+//
+//+ (NSString *)mutMoveCommand500UpWithTouches:(NSArray *)touches
+//                               showImageView:(UIImageView *)showImageView
+//                                       isLan:(BOOL)isLan
+//{
+//    /*比列换算*/
+////    CGFloat ratex = (showImageView.frame.size.width  > showImageView.frame.size.height)?(H_PHONE/showImageView.frame.size.width):(W_PHONE/showImageView.frame.size.width);
+////    CGFloat ratey = (showImageView.frame.size.height > showImageView.frame.size.width)?(H_PHONE/showImageView.frame.size.height):(W_PHONE/showImageView.frame.size.height);
+////    CGFloat ratex = W_PHONE/showImageView.frame.size.width;
+////    CGFloat ratey = H_PHONE/showImageView.frame.size.height;
+//
+//    CGFloat ratex = ksharedAppDelegate.couldPhone_W_PHONE/showImageView.frame.size.width;
+//    CGFloat ratey = ksharedAppDelegate.couldPhone_H_PHONE/showImageView.frame.size.height;
+//
+//
+//    NSString *pointList = @"";
+//    for (NSInteger nfori = 0;nfori < [touches count];nfori++)
+//    {
+//        UITouch *touch = [touches objectAtIndex:nfori];
+//        CGPoint  lastPoint = [touch locationInView:showImageView];
+//
+//        /*换算后的坐标*/
+////        CGFloat x = lastPoint.x*ratex;
+////        CGFloat y = lastPoint.y*ratey;
+//        CGFloat x = isLan?(lastPoint.y*ratey):(lastPoint.x*ratex);
+//        CGFloat y = isLan?((showImageView.frame.size.width - lastPoint.x)*ratex):lastPoint.y*ratey;
+//
+//        pointList = [pointList stringByAppendingString:[NSString stringWithFormat:@"{\"action\":0,\"x\":\"%f\",\"y\":\"%f\"}",x,y]];
+//    }
+//
+//    pointList = [pointList stringByReplacingOccurrencesOfString:@"}{" withString:@"},{"];
+//
+//    NSString *dataStr = [NSString stringWithFormat:@"{\"data\":{\"fingerList\":[%@]},\"type\":\"morePortionMove\"}",pointList];
+//
+//    if (USENEWCONTROLLCOMMONDNO500)
+//    {
+////        dataStr = [self commondAppendingHeadAndEndStrWithSourStr:dataStr];
+//    }
+//    else
+//    {
+//        dataStr = [self commandAppending00StringWithSourStr:dataStr];
+//    }
+//
+//    return dataStr;
+//}
+//
+//+ (NSString *)tapDownCommandTouches:(UITouch *)touch
+//                         touchCount:(NSInteger)touchCount
+//                      showImageView:(UIImageView *)showImageView
+//                              isLan:(BOOL)isLan
+//{
+//    int touchid = 0;
+//
+//    if ([touch respondsToSelector:NSSelectorFromString(@"_touchIdentifier")])
+//    {
+//        touchid = [[touch valueForKey:@"touchIdentifier"] intValue];
+//    }
+//    else/*地址转int*/
+//    {
+//        NSString *ip = [NSString stringWithFormat:@"%p",touch];
+//        ip = [ip substringFromIndex:2];
+//        NSScanner* scanner = [NSScanner scannerWithString:ip];
+//        [scanner scanInteger:&touchid];
+//    }
+//    CGPoint  lastPoint = [touch locationInView:showImageView];
+//
+//    CGFloat ratex = 0.0;
+//    CGFloat ratey = 0.0;
+//
+//    /*横屏状态下需要坐标翻转*/
+//    if(showImageView.frame.size.width > showImageView.frame.size.height){/*横屏模式*/
+//        ratex = ksharedAppDelegate.couldPhone_H_PHONE/showImageView.frame.size.width;
+//        ratey = ksharedAppDelegate.couldPhone_W_PHONE/showImageView.frame.size.height;
+//    }else{
+//        ratex = ksharedAppDelegate.couldPhone_W_PHONE/showImageView.frame.size.width;
+//        ratey = ksharedAppDelegate.couldPhone_H_PHONE/showImageView.frame.size.height;
+//    }
+//    CGFloat x = lastPoint.x*ratex;
+//    CGFloat y = lastPoint.y*ratey;
+//
+//    NSString *dataStr = [NSString stringWithFormat:@"{\"data\":{\"action\":0,\"count\":%ld,\"pointerId\":%d,\"x\":\"%.2f\",\"y\":\"%.2f\"},\"type\":\"event\"}",(long)touchCount,touchid,x,y];
+//
+//    return dataStr;
+//}
+//
+//+ (NSString *)tapUpCommandTouches:(UITouch *)touch
+//                       touchCount:(NSInteger)touchCount
+//                    showImageView:(UIImageView *)showImageView
+//                            isLan:(BOOL)isLan
+//{
+//    int touchid = 0;
+//
+//    if ([touch respondsToSelector:NSSelectorFromString(@"_touchIdentifier")])
+//    {
+//        touchid = [[touch valueForKey:@"touchIdentifier"] intValue];
+//    }
+//    else/*地址转int*/
+//    {
+//        NSString *ip = [NSString stringWithFormat:@"%p",touch];
+//        ip = [ip substringFromIndex:2];
+//        NSScanner* scanner = [NSScanner scannerWithString:ip];
+//        [scanner scanInteger:&touchid];
+//    }
+//
+//    CGFloat ratex = 0.0;
+//    CGFloat ratey = 0.0;
+//
+//    CGPoint  lastPoint = [touch locationInView:showImageView];
+//
+//    /*横屏状态下需要坐标翻转*/
+//    if(showImageView.frame.size.width > showImageView.frame.size.height){/*横屏模式*/
+//        ratex = ksharedAppDelegate.couldPhone_H_PHONE/showImageView.frame.size.width;
+//        ratey = ksharedAppDelegate.couldPhone_W_PHONE/showImageView.frame.size.height;
+//    }else{
+//        ratex = ksharedAppDelegate.couldPhone_W_PHONE/showImageView.frame.size.width;
+//        ratey = ksharedAppDelegate.couldPhone_H_PHONE/showImageView.frame.size.height;
+//    }
+//    CGFloat x = lastPoint.x*ratex;
+//    CGFloat y = lastPoint.y*ratey;
+//
+//    NSString *dataStr = [NSString stringWithFormat:@"{\"data\":{\"action\":1,\"count\":%ld,\"pointerId\":%d,\"x\":\"%.2f\",\"y\":\"%.2f\"},\"type\":\"event\"}",(long)touchCount,touchid,x,y];
+//
+//    return dataStr;
+//}
+//
+//+ (NSString *)tapMoveCommandTouches:(UITouch *)touch
+//                         touchCount:(NSInteger)touchCount
+//                      showImageView:(UIImageView *)showImageView
+//                              isLan:(BOOL)isLan
+//{
+//    int touchid = 0;
+//
+//    if ([touch respondsToSelector:NSSelectorFromString(@"_touchIdentifier")])
+//    {
+//        touchid = [[touch valueForKey:@"touchIdentifier"] intValue];
+//    }
+//    else/*地址转int*/
+//    {
+//        NSString *ip = [NSString stringWithFormat:@"%p",touch];
+//        ip = [ip substringFromIndex:2];
+//        NSScanner* scanner = [NSScanner scannerWithString:ip];
+//        [scanner scanInteger:&touchid];
+//    }
+//
+//    CGFloat ratex = 0.0;
+//    CGFloat ratey = 0.0;
+//
+//    CGPoint  lastPoint = [touch locationInView:showImageView];
+//
+//    /*横屏状态下需要坐标翻转*/
+//    if(showImageView.frame.size.width > showImageView.frame.size.height){/*横屏模式*/
+//        ratex = ksharedAppDelegate.couldPhone_H_PHONE/showImageView.frame.size.width;
+//        ratey = ksharedAppDelegate.couldPhone_W_PHONE/showImageView.frame.size.height;
+//    }else{
+//        ratex = ksharedAppDelegate.couldPhone_W_PHONE/showImageView.frame.size.width;
+//        ratey = ksharedAppDelegate.couldPhone_H_PHONE/showImageView.frame.size.height;
+//    }
+//    CGFloat x = lastPoint.x*ratex;
+//    CGFloat y = lastPoint.y*ratey;
+//
+//    NSString *dataStr = [NSString stringWithFormat:@"{\"data\":{\"action\":2,\"count\":%ld,\"pointerId\":%d,\"x\":\"%.2f\",\"y\":\"%.2f\"},\"type\":\"event\"}",(long)touchCount,touchid,x,y];
+//
+//    return dataStr;
+//}
+
 #pragma -mark- 新设备控制指令
 + (NSString *)mutTapCommand500DownWithTouches:(NSArray *)touches
                                 showImageView:(UIImageView *)showImageView
@@ -44,6 +298,7 @@
 //    CGFloat ratey = (showImageView.frame.size.height > showImageView.frame.size.width)?(H_PHONE/showImageView.frame.size.height):(W_PHONE/showImageView.frame.size.height);
 //    CGFloat ratex = W_PHONE/showImageView.frame.size.width;
 //    CGFloat ratey = H_PHONE/showImageView.frame.size.height;
+    
     CGFloat ratex = ksharedAppDelegate.couldPhone_W_PHONE/showImageView.frame.size.width;
     CGFloat ratey = ksharedAppDelegate.couldPhone_H_PHONE/showImageView.frame.size.height;
 
@@ -186,21 +441,19 @@
         NSScanner* scanner = [NSScanner scannerWithString:ip];
         [scanner scanInteger:&touchid];
     }
-    CGPoint  lastPoint = [touch locationInView:showImageView];
     
     CGFloat ratex = 0.0;
     CGFloat ratey = 0.0;
     
-    /*横屏状态下需要坐标翻转*/
-    if(showImageView.frame.size.width > showImageView.frame.size.height){/*横屏模式*/
-        ratex = ksharedAppDelegate.couldPhone_H_PHONE/showImageView.frame.size.width;
-        ratey = ksharedAppDelegate.couldPhone_W_PHONE/showImageView.frame.size.height;
-    }else{
-        ratex = ksharedAppDelegate.couldPhone_W_PHONE/showImageView.frame.size.width;
-        ratey = ksharedAppDelegate.couldPhone_H_PHONE/showImageView.frame.size.height;
-    }
-    CGFloat x = lastPoint.x*ratex;
-    CGFloat y = lastPoint.y*ratey;
+    ratex = ksharedAppDelegate.couldPhone_W_PHONE/showImageView.frame.size.width;
+    ratey = ksharedAppDelegate.couldPhone_H_PHONE/showImageView.frame.size.height;
+    
+    NSLog(@"kk is 1");
+    
+    CGPoint  lastPoint = [touch locationInView:showImageView];
+            
+    CGFloat x = isLan?(lastPoint.y*ratey):(lastPoint.x*ratex);
+    CGFloat y = isLan?((showImageView.frame.size.width - lastPoint.x)*ratex):lastPoint.y*ratey;
     
     NSString *dataStr = [NSString stringWithFormat:@"{\"data\":{\"action\":0,\"count\":%ld,\"pointerId\":%d,\"x\":\"%.2f\",\"y\":\"%.2f\"},\"type\":\"event\"}",(long)touchCount,touchid,x,y];
         
@@ -229,18 +482,15 @@
     CGFloat ratex = 0.0;
     CGFloat ratey = 0.0;
     
+    ratex = ksharedAppDelegate.couldPhone_W_PHONE/showImageView.frame.size.width;
+    ratey = ksharedAppDelegate.couldPhone_H_PHONE/showImageView.frame.size.height;
+    
+    NSLog(@"kk is 3");
+    
     CGPoint  lastPoint = [touch locationInView:showImageView];
             
-    /*横屏状态下需要坐标翻转*/
-    if(showImageView.frame.size.width > showImageView.frame.size.height){/*横屏模式*/
-        ratex = ksharedAppDelegate.couldPhone_H_PHONE/showImageView.frame.size.width;
-        ratey = ksharedAppDelegate.couldPhone_W_PHONE/showImageView.frame.size.height;
-    }else{
-        ratex = ksharedAppDelegate.couldPhone_W_PHONE/showImageView.frame.size.width;
-        ratey = ksharedAppDelegate.couldPhone_H_PHONE/showImageView.frame.size.height;
-    }
-    CGFloat x = lastPoint.x*ratex;
-    CGFloat y = lastPoint.y*ratey;
+    CGFloat x = isLan?(lastPoint.y*ratey):(lastPoint.x*ratex);
+    CGFloat y = isLan?((showImageView.frame.size.width - lastPoint.x)*ratex):lastPoint.y*ratey;
     
     NSString *dataStr = [NSString stringWithFormat:@"{\"data\":{\"action\":1,\"count\":%ld,\"pointerId\":%d,\"x\":\"%.2f\",\"y\":\"%.2f\"},\"type\":\"event\"}",(long)touchCount,touchid,x,y];
         
@@ -269,24 +519,20 @@
     CGFloat ratex = 0.0;
     CGFloat ratey = 0.0;
     
+    ratex = ksharedAppDelegate.couldPhone_W_PHONE/showImageView.frame.size.width;
+    ratey = ksharedAppDelegate.couldPhone_H_PHONE/showImageView.frame.size.height;
+    
+    NSLog(@"kk is 2");
+    
     CGPoint  lastPoint = [touch locationInView:showImageView];
             
-    /*横屏状态下需要坐标翻转*/
-    if(showImageView.frame.size.width > showImageView.frame.size.height){/*横屏模式*/
-        ratex = ksharedAppDelegate.couldPhone_H_PHONE/showImageView.frame.size.width;
-        ratey = ksharedAppDelegate.couldPhone_W_PHONE/showImageView.frame.size.height;
-    }else{
-        ratex = ksharedAppDelegate.couldPhone_W_PHONE/showImageView.frame.size.width;
-        ratey = ksharedAppDelegate.couldPhone_H_PHONE/showImageView.frame.size.height;
-    }
-    CGFloat x = lastPoint.x*ratex;
-    CGFloat y = lastPoint.y*ratey;
+    CGFloat x = isLan?(lastPoint.y*ratey):(lastPoint.x*ratex);
+    CGFloat y = isLan?((showImageView.frame.size.width - lastPoint.x)*ratex):lastPoint.y*ratey;
     
     NSString *dataStr = [NSString stringWithFormat:@"{\"data\":{\"action\":2,\"count\":%ld,\"pointerId\":%d,\"x\":\"%.2f\",\"y\":\"%.2f\"},\"type\":\"event\"}",(long)touchCount,touchid,x,y];
         
     return dataStr;
 }
-
 + (NSString *)toStopControllerDevice500
 {
     NSString *stopContrStr    = [NSString stringWithFormat:@"{\"data\":{\"x\":\"%d\",\"y\":\"%d\"},\"type\":\"closeServer\"}",0,0];
@@ -343,6 +589,25 @@
 }
 
 /**
+* @brief 关闭本地键盘透传
+*
+*/
++ (NSString *)commandCloseLoaclKeyboad{
+    NSString *stopContrStr    = @"{\"data\":{\"type\":2},\"type\":\"InputMethod\"}";
+    
+    if (USENEWCONTROLLCOMMONDNO500)
+    {
+//        stopContrStr = [self commondAppendingHeadAndEndStrWithSourStr:stopContrStr];
+    }
+    else
+    {
+        stopContrStr = [self commandAppending00StringWithSourStr:stopContrStr];
+    }
+    
+    return stopContrStr;
+}
+
+/**
 * @brief 关闭云手机键盘透传
 *
 */
@@ -434,6 +699,21 @@
     return dataStr;
 }
 
++ (NSString *)commandSetFps{
+    NSString *dataStr = @"{\"data\":{\"frame_rate\":25,\"clientType\":\"ios\"},\"type\":5}";
+    
+    if (USENEWCONTROLLCOMMONDNO500)
+    {
+//        dataStr = [self commondAppendingHeadAndEndStrWithSourStr:dataStr];
+    }
+    else
+    {
+        dataStr = [self commandAppending00StringWithSourStr:dataStr];
+    }
+    
+    return dataStr;
+}
+
 /**
 * @brief 云手机预览图指令
 */
@@ -555,6 +835,7 @@
     return dataStr;
 }
 
+
 + (NSArray *)getAllIvar:(id)object
 {
     NSMutableArray *array = [NSMutableArray array];

+ 4 - 0
双子星云手机/CloudPlayer/View/PlayerView.h

@@ -18,6 +18,10 @@ NS_ASSUME_NONNULL_BEGIN
 @optional
 - (void)useInfoBtnBePressed:(id)sender;
 - (void)playerShowImageViewtouchesStr:(NSString *)commondStr;
+
+- (void)mueBtnBePressed:(id)sender;
+- (void)homeBtnBePressed:(id)sender;
+- (void)backBtnBePressed:(id)sender;
 @end
 
 @interface PlayerView : UIView

+ 115 - 4
双子星云手机/CloudPlayer/View/PlayerView.m

@@ -18,6 +18,12 @@ ShowImageViewDelegate>{
     
     //触控指令视图,用于计算触控位置坐标
     ShowImageView *touchCommondView;
+    
+    UIView *bottomContrView;
+    
+    UIButton *mueBtn;
+    UIButton *homeBtn;
+    UIButton *backBtn;
 }
 
 @end
@@ -132,9 +138,77 @@ ShowImageViewDelegate>{
     [controlBtn setImage:driftBtnImage forState:(UIControlStateNormal)];
     [controlBtn addGestureRecognizer:[[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(controlBtnLongPress:)]];
     
+    /*下方控制器*/
+    bottomContrView = [[UIView alloc] initWithFrame:CGRectMake(0, frame.size.height - 47.f, frame.size.width, 47.f)];
+    [bottomContrView setBackgroundColor:[UIColor blackColor]];
+    [self addSubview:bottomContrView];
+    [bottomContrView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.right.mas_equalTo(0);
+        make.height.mas_equalTo(47.f);
+        make.left.mas_equalTo(0.f);
+        make.bottom.mas_equalTo(0.f);
+    }];
+    [bottomContrView setHidden:YES];
+    
+    [self initAddSubViewForBottomContrView];
+    
     [self setPoMas_makeWithImageRate:frame.size.width/frame.size.height isOpenVirtual:NO isUsageMode:NO];
 }
 
+- (void)initAddSubViewForBottomContrView{
+    /*第一个app菜单*/
+    UIImage  *mueBtnImage = [UIImage imageNamed:@"houtai_icon"];
+    mueBtn = [[UIButton alloc] init];
+    [mueBtn setBackgroundColor:[UIColor clearColor]];
+    [mueBtn addTarget:self
+               action:@selector(mueBtnPressed:)
+     forControlEvents:(UIControlEventTouchUpInside)];
+    [mueBtn setImage:mueBtnImage forState:(UIControlStateNormal)];
+    [mueBtn setImageEdgeInsets:(UIEdgeInsetsMake(6.f, 6.f, 6.f, 6.f))];
+    [bottomContrView addSubview:mueBtn];
+    
+    /*第二个home键*/
+    UIImage  *homeBtnImage = [UIImage imageNamed:@"home_icon"];
+    homeBtn = [[UIButton alloc] init];
+    [homeBtn setBackgroundColor:[UIColor clearColor]];
+    [homeBtn addTarget:self
+                action:@selector(homeBtnPressed:)
+      forControlEvents:(UIControlEventTouchUpInside)];
+    [homeBtn setImage:homeBtnImage forState:(UIControlStateNormal)];
+    [homeBtn setImageEdgeInsets:(UIEdgeInsetsMake(6.f, 6.f, 6.f, 6.f))];
+    [bottomContrView addSubview:homeBtn];
+    
+    /*第三个返回键*/
+    UIImage  *backBtnImage = [UIImage imageNamed:@"fanhui_you_icon"];
+    backBtn = [[UIButton alloc] init];
+    [backBtn setBackgroundColor:[UIColor clearColor]];
+    [backBtn addTarget:self
+                action:@selector(backBtnPressed:)
+      forControlEvents:(UIControlEventTouchUpInside)];
+    [backBtn setImage:backBtnImage forState:(UIControlStateNormal)];
+    [backBtn setImageEdgeInsets:(UIEdgeInsetsMake(6.f, 6.f, 6.f, 6.f))];
+    [bottomContrView addSubview:backBtn];
+}
+
+- (void)mueBtnPressed:(id)sender{
+    if ([delegate respondsToSelector:@selector(mueBtnBePressed:)]) {
+        [delegate mueBtnBePressed:sender];
+    }
+}
+
+
+- (void)homeBtnPressed:(id)sender{
+    if ([delegate respondsToSelector:@selector(homeBtnBePressed:)]) {
+        [delegate homeBtnBePressed:sender];
+    }
+}
+
+- (void)backBtnPressed:(id)sender{
+    if ([delegate respondsToSelector:@selector(backBtnBePressed:)]) {
+        [delegate backBtnBePressed:sender];
+    }
+}
+
 - (void)initPoMas_makeWithImageRate:(BOOL)isOpenVirtual isUsageMode:(BOOL)isUsageMode{
     [self setPoMas_makeWithImageRate:self.frame.size.width/self.frame.size.height isOpenVirtual:isOpenVirtual isUsageMode:isUsageMode];
 }
@@ -150,10 +224,18 @@ ShowImageViewDelegate>{
             scr_W = SCREEN_H;
             scr_H = SCREEN_W;
         }
-        make.left.mas_equalTo(0.f);
-        make.height.mas_equalTo(scr_W/w_h_rate);
-        make.right.mas_equalTo(0.f);
-        make.top.mas_equalTo((scr_H - scr_W/w_h_rate)/2.f);
+        if ((scr_H - scr_W/w_h_rate - 40.f)/2.f < 0){
+            make.height.mas_equalTo(scr_H - 40.f);
+            make.width.mas_equalTo((scr_H - 40.f)*w_h_rate);
+            make.centerX.equalTo(self.mas_centerX);
+            make.top.mas_equalTo(0);
+        }
+        else{
+            make.left.mas_equalTo(0.f);
+            make.height.mas_equalTo(scr_W/w_h_rate);
+            make.right.mas_equalTo(0.f);
+            make.top.mas_equalTo((scr_H - scr_W/w_h_rate - 40.f)/2.f);
+        }
     }];
     
     [showImageView    setTransform:CGAffineTransformMakeRotation(0)];
@@ -171,6 +253,35 @@ ShowImageViewDelegate>{
         make.top.equalTo(touchCommondView.mas_top);
         make.bottom.equalTo(touchCommondView.mas_bottom);
     }];
+    
+    [bottomContrView setHidden:NO];
+    [bottomContrView mas_remakeConstraints:^(MASConstraintMaker *make) {
+        make.height.mas_equalTo(40.f);
+        make.right.equalTo(touchCommondView.mas_right);
+        make.top.equalTo(touchCommondView.mas_bottom);
+        make.left.equalTo(touchCommondView.mas_left);
+    }];
+
+    [mueBtn mas_remakeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(41.f);
+        make.width.and.height.mas_equalTo(40.f);
+        make.top.mas_equalTo(0);
+    }];
+
+    [homeBtn mas_remakeConstraints:^(MASConstraintMaker *make) {
+        make.centerX.equalTo(bottomContrView.mas_centerX);
+        make.width.and.height.mas_equalTo(40.f);
+        make.top.mas_equalTo(0);
+    }];
+
+    UIImage  *backBtnImage = [UIImage imageNamed:@"fanhui_you_icon"];
+//        UIImage  *backBtnImage = [UIImage imageNamed:@"fanhui_icon"];
+    [backBtn setImage:backBtnImage forState:(UIControlStateNormal)];
+    [backBtn mas_remakeConstraints:^(MASConstraintMaker *make) {
+        make.right.mas_equalTo(-41.f);
+        make.width.and.height.mas_equalTo(40.f);
+        make.top.mas_equalTo(0);
+    }];
 }
 
 /**

+ 22 - 4
双子星云手机/zh-Hans.lproj/Localizable.strings

@@ -154,7 +154,25 @@
 
 "other_comment_ok"         = "确定";
 
-
-
-//NSLocalizedString(@"buy_vip_buy_no_vaildtime",nil)
-//NSLocalizedString(@"buy_vip_package_detail_day",nil)
+"my_set_no_time_top"   = "到期时间:";
+"my_set_no_vip_tips"   = "你当前为非会员,无法享受专属私密手机";
+"my_set_no_vip_open_vip"   = "立即开通";
+"my_set_no_change_logo"   = "更换图标";
+"my_set_no_hidden_app"   = "进程隐藏";
+"my_set_no_invite_friend"   = "邀请好友";
+"my_set_no_invite_friend_get_vip"   = "邀请好友送会员";
+"my_set_no_check_update"   = "检测更新";
+"my_set_no_connect_kefu"   = "联系客服";
+"my_set_no_logout"   = "退出账号";
+"my_set_no_app_kefu"   = "隐私空间客服";
+"my_set_no_buy_recoder"   = "购买记录";
+"my_set_no_fanzhuan_exit" = "翻转退出";
+"my_set_no_restart_phone" = "重启空间";
+"my_set_no_restart_phone_tips" = "你确定要重启空间?";
+"my_set_no_restart_phone_btn_ok" = "重启";
+
+
+"my_set_no_restart_phone_ok_tips" = "重启成功!";
+"my_set_no_restart_phone_tips_no_vip" = "当前vip已过期!";
+//NSLocalizedString(@"my_set_no_restart_phone_tips_no_vip",nil)
+//NSLocalizedString(@"my_set_no_invite_friend_get_vip",nil)