Bläddra i källkod

1.首页弹框流程

huangxiaodong 1 år sedan
förälder
incheckning
eeb5e763ef

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

@@ -702,6 +702,10 @@
 		6B8FF6BA2B04E19600800981 /* uploadFileRecordheadView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B8FF6B82B04E19600800981 /* uploadFileRecordheadView.m */; };
 		6B8FF6C12B05B24D00800981 /* uploadFileRecordCell.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B8FF6BF2B05B24D00800981 /* uploadFileRecordCell.h */; };
 		6B8FF6C22B05B24D00800981 /* uploadFileRecordCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B8FF6C02B05B24D00800981 /* uploadFileRecordCell.m */; };
+		6B9283662C4B62A30098CC75 /* newerGuideView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B9283652C4B62A30098CC75 /* newerGuideView.m */; };
+		6B9283672C4B62A30098CC75 /* newerGuideView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B9283642C4B62A30098CC75 /* newerGuideView.h */; };
+		6B9283682C4B62A30098CC75 /* newerGuideView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B9283642C4B62A30098CC75 /* newerGuideView.h */; };
+		6B9283692C4B62A30098CC75 /* newerGuideView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B9283652C4B62A30098CC75 /* newerGuideView.m */; };
 		6B9354882BF2FE8700AA8D31 /* editTypeHeadView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B9354872BF2FE8700AA8D31 /* editTypeHeadView.m */; };
 		6B9354892BF2FE8700AA8D31 /* editTypeHeadView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B9354862BF2FE8700AA8D31 /* editTypeHeadView.h */; };
 		6B93548A2BF2FE8700AA8D31 /* editTypeHeadView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B9354862BF2FE8700AA8D31 /* editTypeHeadView.h */; };
@@ -1854,6 +1858,8 @@
 		6B8FF6B82B04E19600800981 /* uploadFileRecordheadView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = uploadFileRecordheadView.m; sourceTree = "<group>"; };
 		6B8FF6BF2B05B24D00800981 /* uploadFileRecordCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = uploadFileRecordCell.h; sourceTree = "<group>"; };
 		6B8FF6C02B05B24D00800981 /* uploadFileRecordCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = uploadFileRecordCell.m; sourceTree = "<group>"; };
+		6B9283642C4B62A30098CC75 /* newerGuideView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = newerGuideView.h; sourceTree = "<group>"; };
+		6B9283652C4B62A30098CC75 /* newerGuideView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = newerGuideView.m; sourceTree = "<group>"; };
 		6B9354862BF2FE8700AA8D31 /* editTypeHeadView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = editTypeHeadView.h; sourceTree = "<group>"; };
 		6B9354872BF2FE8700AA8D31 /* editTypeHeadView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = editTypeHeadView.m; sourceTree = "<group>"; };
 		6B93548C2BF30A8C00AA8D31 /* editTypeBottomView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = editTypeBottomView.h; sourceTree = "<group>"; };
@@ -3048,6 +3054,8 @@
 				6B5D86782C22D6E9008D25EA /* NASLastFileView.m */,
 				6B07E0A42C3CD4AF004A3238 /* lastFileTableViewCell.h */,
 				6B07E0A52C3CD4AF004A3238 /* lastFileTableViewCell.m */,
+				6B9283642C4B62A30098CC75 /* newerGuideView.h */,
+				6B9283652C4B62A30098CC75 /* newerGuideView.m */,
 			);
 			path = view;
 			sourceTree = "<group>";
@@ -3703,6 +3711,7 @@
 				184C8ADA2A949DAC00F26650 /* HaveNewVersionView.h in Headers */,
 				6BBB35DD2AE76AD800E4A59B /* AudioSessionObject.h in Headers */,
 				6B2C1EA02C070ADE00FDCF82 /* ZFPortraitViewController.h in Headers */,
+				6B9283672C4B62A30098CC75 /* newerGuideView.h in Headers */,
 				6B0582782AFF7C6D00D37290 /* TZAssetModel+imageData.h in Headers */,
 				6B8661DD2BBA578600B19846 /* HaveNoticeView.h in Headers */,
 				6B5D403F2B4CE40F000965CF /* downloadManager.h in Headers */,
@@ -3963,6 +3972,7 @@
 				6BD506A32B9576A4006E7CB0 /* HaveNewVersionView.h in Headers */,
 				6BD506A42B9576A4006E7CB0 /* AudioSessionObject.h in Headers */,
 				6B2C1EA12C070ADE00FDCF82 /* ZFPortraitViewController.h in Headers */,
+				6B9283682C4B62A30098CC75 /* newerGuideView.h in Headers */,
 				6BD506A52B9576A4006E7CB0 /* TZAssetModel+imageData.h in Headers */,
 				6B8661DE2BBA578600B19846 /* HaveNoticeView.h in Headers */,
 				6BD506A62B9576A4006E7CB0 /* downloadManager.h in Headers */,
@@ -4708,6 +4718,7 @@
 				6BD507542B9576A4006E7CB0 /* AFURLRequestSerialization.m in Sources */,
 				6BD507552B9576A4006E7CB0 /* AJPhotoGroupCell.m in Sources */,
 				6BD507562B9576A4006E7CB0 /* HaveNewVersionView.m in Sources */,
+				6B9283692C4B62A30098CC75 /* newerGuideView.m in Sources */,
 				6BD507572B9576A4006E7CB0 /* PhotoPreviewViewController.m in Sources */,
 				6BD507582B9576A4006E7CB0 /* UIView+HWCategory.m in Sources */,
 				6B2C1E8B2C070ADE00FDCF82 /* ZFPlayerController.m in Sources */,
@@ -5050,6 +5061,7 @@
 				183AE6572A8A2CF000B11CB0 /* AFURLRequestSerialization.m in Sources */,
 				6B0581AC2AFCF57300D37290 /* AJPhotoGroupCell.m in Sources */,
 				184C8AD92A949DAC00F26650 /* HaveNewVersionView.m in Sources */,
+				6B9283662C4B62A30098CC75 /* newerGuideView.m in Sources */,
 				6B0582642AFF4B7D00D37290 /* PhotoPreviewViewController.m in Sources */,
 				A003F6B527D841EE00715CBF /* UIView+HWCategory.m in Sources */,
 				6B2C1E8A2C070ADE00FDCF82 /* ZFPlayerController.m in Sources */,

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

@@ -24,6 +24,8 @@
 @property (nonatomic, assign)BOOL getSystemPermissType;//主动获取权限进入后台
 @property (nonatomic, assign)BOOL DisabledFileTransferType;//禁用文件传输
 @property (nonatomic, assign)BOOL isImageNewFor130;//1.3.0的镜像是否待更新
+@property (nonatomic, assign)BOOL isNeedShowImageNewType;//是否需要显示镜像强制更新
+
 @property (nonatomic, assign)BOOL isWebSockLinkOKAginType;//WebSock断开后或者链接上了
 @property (nonatomic, strong) TvStatusModel * TvStatusMod;
 

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

@@ -157,6 +157,9 @@ UIKIT_EXTERN NSString *const Consn_player_full_screen_show;
 /*是否显示最近文件 YES:显示  其他显示*/
 UIKIT_EXTERN NSString *const Const_last_file_show;
 
+/*是否显示过新手引导 YES:显示  其他显示*/
+UIKIT_EXTERN NSString *const Const_did_show_newer_Guide;
+
 @end
 
 NS_ASSUME_NONNULL_END

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

@@ -153,4 +153,8 @@ NSString *const Consn_player_full_screen_show = @"player_full_screen_show";
 
 /*是否显示最近文件 YES:显示  其他显示*/
 NSString *const Const_last_file_show = @"last_file_show";
+
+/*是否显示过新手引导 YES:显示  其他显示*/
+NSString *const Const_did_show_newer_Guide = @"id_show_newer_Guide";
+
 @end

+ 4 - 4
创维盒子/双子星云手机/AppDelegate/PrefixHeader.pch

@@ -96,13 +96,13 @@ isBangsScreen; \
 //#define CloudService   @"http://14.18.190.141:1801"
 //#define shareService   @"http://testprivacy.phone.armclouding.com:1801/h5/#/pages/fileSharing/index?productType=Private-X&token="
 
-//#define CloudService   @"http://testprivacy.phone.androidscloud.com:1801"
-//#define shareService   @"http://testprivacy.phone.androidscloud.com:1801/h5/#/pages/fileSharing/index?productType=Private-X&token="
+#define CloudService   @"http://testprivacy.phone.androidscloud.com:1801"
+#define shareService   @"http://testprivacy.phone.androidscloud.com:1801/h5/#/pages/fileSharing/index?productType=Private-X&token="
 
 
 //生产环境
-#define CloudService   @"http://hiboxde.armclouding.com:7780"
-#define shareService   @"http://hiboxde.armclouding.com:7780/h5/#/pages/fileSharing/index?productType=Private-X&token="
+//#define CloudService   @"http://hiboxde.armclouding.com:7780"
+//#define shareService   @"http://hiboxde.armclouding.com:7780/h5/#/pages/fileSharing/index?productType=Private-X&token="
 
 #define AESCODEKEEYY @"fvO8gAfNSr1tbdQe"
 

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

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

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


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


+ 1 - 0
创维盒子/双子星云手机/Class/Set/CustomerWebViewController.h

@@ -16,6 +16,7 @@ NS_ASSUME_NONNULL_BEGIN
 @property (nonatomic,copy) NSString *titleStr;
 @property (nonatomic,assign) BOOL needHidenNav;
 
+@property (nonatomic,copy) void (^didClickBackFun)(void);
 @end
 
 NS_ASSUME_NONNULL_END

+ 20 - 1
创维盒子/双子星云手机/Class/Set/CustomerWebViewController.m

@@ -51,10 +51,13 @@
 #pragma mark 点击返回
 - (void)backBtnPressed
 {
-    if([self.webView canGoBack]){
+    if([self.webView canGoBack] && ![self.webUrl containsString:@"novice?isNovice=true"]){
         [self.webView goBack];
     }
     else {
+        if(_didClickBackFun){
+            _didClickBackFun();
+        }
         [super backBtnPressed];
     }
 }
@@ -117,6 +120,15 @@
     }
 }
 
+//- (void)setWebUrl:(NSString *)webUrl{
+//    _webUrl = webUrl;
+//    
+//    // 加载网页
+//    NSURL *url = [NSURL URLWithString:_webUrl];
+//    NSURLRequest *request = [NSURLRequest requestWithURL:url];
+//    [self.webView loadRequest:request];
+//    
+//}
 
 #pragma mark 事件代理
 // 页面开始加载时调用
@@ -131,6 +143,13 @@
 - (void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation{//这里修改导航栏的标题,动态改变
     [self removeNewIndicator];
     
+    NSString *curWebTitle = webView.title;
+    
+    //暂时只处理 首页点进来的新手引导
+    if(curWebTitle && curWebTitle.length>0 && [self.webUrl containsString:@"novice?isNovice=true"]){
+        self.titleLabel.text = curWebTitle;
+    }
+    
     [self showWebView1];
 }
 // 页面加载失败时调用

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

@@ -276,7 +276,7 @@ UIDocumentPickerDelegate>
     [_checkThridConnectTimer invalidate];
     
     //做版本检测
-    [self checkVersionFun];
+    //[self checkVersionFun];
     
     [self connectVideoServer];
     

Filskillnaden har hållts tillbaka eftersom den är för stor
+ 267 - 1
创维盒子/双子星云手机/NAS/NASViewController.m


+ 16 - 0
创维盒子/双子星云手机/NAS/view/newerGuideView.h

@@ -0,0 +1,16 @@
+//
+//  newerGuideView.h
+//  双子星云手机
+//
+//  Created by xd h on 2024/7/20.
+//
+
+#import <UIKit/UIKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface newerGuideView : UIView
+@property (nonatomic,copy) void (^didClickButtonFun)(NSInteger tag);
+@end
+
+NS_ASSUME_NONNULL_END

+ 178 - 0
创维盒子/双子星云手机/NAS/view/newerGuideView.m

@@ -0,0 +1,178 @@
+//
+//  newerGuideView.m
+//  双子星云手机
+//
+//  Created by xd h on 2024/7/20.
+//
+
+#import "newerGuideView.h"
+
+@interface newerGuideView ()
+@property(nonatomic,strong) UILabel*titleLabel;
+
+
+@end
+
+@implementation newerGuideView
+
+- (id)initWithFrame:(CGRect)frame{
+    self = [super initWithFrame:frame];
+    
+    self.backgroundColor = [UIColor hwColor:@"#000000" alpha:0.6];
+    [self drawAnyView];
+    
+    return self;
+}
+
+-(void)drawAnyView
+{
+    UIView *whiteBgView = [[UIView alloc] init];
+    whiteBgView.backgroundColor = [UIColor whiteColor];
+    [self addSubview:whiteBgView];
+    whiteBgView.layer.cornerRadius = 8;
+    whiteBgView.layer.masksToBounds = YES;
+    
+    [whiteBgView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.centerX.mas_equalTo(0);
+        make.width.mas_equalTo(300);
+        make.height.mas_equalTo(288);
+        make.centerY.mas_equalTo(0);
+    }];
+    
+   
+    UIImageView * imageBgView = [[UIImageView alloc] init];
+    imageBgView.image = [UIImage imageNamed:@"nas_newerGuide"];
+    [self addSubview:imageBgView];
+    
+    [imageBgView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.centerX.mas_equalTo(0);
+        make.width.mas_equalTo(300);
+        make.height.mas_equalTo(162);
+        make.top.equalTo(whiteBgView.mas_top).offset(-66);
+    }];
+    
+    //新手视频
+    UILabel *titleLabel = [[UILabel alloc] init];
+    titleLabel.font = [UIFont boldSystemFontOfSize:18.0];
+    titleLabel.textColor = [UIColor hwColor:@"#151515"];
+    titleLabel.text = NSLocalizedString(@"NAS_newer_guide_video",nil);
+    titleLabel.textAlignment = NSTextAlignmentCenter;
+    [whiteBgView addSubview:titleLabel];
+    
+    [titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.height.mas_equalTo(20);
+        make.left.mas_equalTo(0);
+        make.right.mas_equalTo(0);
+        make.centerY.mas_equalTo(-15);
+    }];
+
+    //为您打开新世界的大门
+    UILabel *title2Label = [[UILabel alloc] init];
+    title2Label.font = [UIFont systemFontOfSize:14.0];
+    title2Label.textColor = [UIColor hwColor:@"#0A132B"];
+    title2Label.text = NSLocalizedString(@"NAS_newer_guide_video_to_world",nil);
+    title2Label.textAlignment = NSTextAlignmentCenter;
+    [whiteBgView addSubview:title2Label];
+    
+    [title2Label mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.height.mas_equalTo(20);
+        make.left.mas_equalTo(0);
+        make.right.mas_equalTo(0);
+        make.top.equalTo(titleLabel.mas_bottom).offset(8);
+    }];
+    
+    //您可以在【我的>新手引导】查看操作教程
+    UILabel *title3Label = [[UILabel alloc] init];
+    title3Label.font = [UIFont systemFontOfSize:14.0];
+    title3Label.textColor = [UIColor hwColor:@"#0A132B"];
+    //title3Label.text = NSLocalizedString(@"NAS_newer_guide_video_to_world",nil);
+    title3Label.textAlignment = NSTextAlignmentCenter;
+    [whiteBgView addSubview:title3Label];
+    
+    [title3Label mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.height.mas_equalTo(20);
+        make.left.mas_equalTo(0);
+        make.right.mas_equalTo(0);
+        make.top.equalTo(title2Label.mas_bottom).offset(8);
+    }];
+    
+    NSString *title1 = NSLocalizedString(@"NAS_newer_guide_video_tip1",nil);
+    NSString *title2 = NSLocalizedString(@"NAS_newer_guide_video_tip2",nil);
+    NSString *title3 = NSLocalizedString(@"NAS_newer_guide_video_tip3",nil);
+
+    NSString *fullTitle = [[NSString alloc] initWithFormat:@"%@ %@%@",title1,title2,title3];
+    
+    NSMutableAttributedString *attrStr = [[NSMutableAttributedString alloc] initWithString:fullTitle];
+    NSRange redRange = NSMakeRange([fullTitle rangeOfString:title2].location, [fullTitle rangeOfString:title2].length);
+    UIColor *noteColor =[UIColor hwColor:@"#01B7EA" alpha:1.0];
+    [attrStr addAttribute:NSForegroundColorAttributeName value:noteColor range:redRange];
+    //[attrStr addAttribute:NSFontAttributeName value:[UIFont boldSystemFontOfSize:16.0] range:redRange];
+    
+    title3Label.attributedText = attrStr;
+
+    UIButton *leftbut = [[UIButton alloc] init];
+    leftbut.tag = 1;
+    [leftbut addTarget:self action:@selector(didClickButtonFun:) forControlEvents:UIControlEventTouchUpInside];
+    [leftbut setTitle:NSLocalizedString(@"NAS_newer_guide_not_newer",nil) forState:UIControlStateNormal];
+    [leftbut setTitleColor:[UIColor hwColor:@"#0A132B"] forState:UIControlStateNormal];
+    leftbut.titleLabel.font = [UIFont systemFontOfSize:16];
+    leftbut.backgroundColor = [UIColor hwColor:@"#E3E8F1"];
+    leftbut.layer.cornerRadius = 8;
+    [whiteBgView addSubview:leftbut];
+    
+    [leftbut mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(30);
+        make.width.mas_equalTo(110);
+        make.height.mas_equalTo(40);
+        make.bottom.mas_equalTo(-25);
+    }];
+    
+    
+    // gradient
+    CAGradientLayer *gl = [CAGradientLayer layer];
+    gl.frame = CGRectMake(0,0,110,40);
+    gl.startPoint = CGPointMake(0.0, 0.5);
+    gl.endPoint = CGPointMake(1, 0.5);
+    gl.colors = @[(__bridge id)[UIColor hwColor:@"#0BDDFD"].CGColor, (__bridge id)[UIColor hwColor:@"#048CFB"].CGColor];
+    gl.locations = @[@(0), @(1.0f)];
+    
+    UIButton *rightbut = [[UIButton alloc] init];
+    [rightbut.layer addSublayer:gl];
+    
+    rightbut.tag = 2;
+    [rightbut addTarget:self action:@selector(didClickButtonFun:) forControlEvents:UIControlEventTouchUpInside];
+    [rightbut setTitle:NSLocalizedString(@"NAS_newer_guide_go_see",nil) forState:UIControlStateNormal];
+    [rightbut setTitleColor:[UIColor hwColor:@"#FFFFFF"] forState:UIControlStateNormal];
+    rightbut.titleLabel.font = [UIFont systemFontOfSize:16];
+    rightbut.layer.cornerRadius = 8;
+    rightbut.layer.masksToBounds = YES;
+    [whiteBgView addSubview:rightbut];
+    
+    [rightbut mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.right.mas_equalTo(-30);
+        make.width.mas_equalTo(110);
+        make.height.mas_equalTo(40);
+        make.bottom.mas_equalTo(-25);
+    }];
+    
+
+}
+
+
+
+
+#pragma mark 按钮事件
+- (void)didClickButtonFun:(UIButton*)but
+{
+    NSInteger tag = but.tag;
+    HLog(@"%ld",tag);
+    
+    [self removeFromSuperview];
+    
+    
+    if(_didClickButtonFun){
+        _didClickButtonFun(tag);
+    }
+}
+@end
+

+ 1 - 2
创维盒子/双子星云手机/cloudPhone/websocket/webSocketManager.m

@@ -495,8 +495,7 @@ static webSocketManager *webSocketManagerInstance = nil;
     
     if(!_didSendfristMsg )
     {
-        NSString *commondStr3  = @"{\"type\":\"getSysInfo\"}";
-        [self send_data:commondStr3];
+        [self getSysInfoFun];
         
 //        NSString *commondStr  = @"{\"type\":\"forwardMsg\",\"data\":\"offline_notification\"}";
 //        [self send_data:commondStr];

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

@@ -556,6 +556,13 @@
 "NAS_details_file_path"   = "所在位置:";
 "NAS_audio_cur_play_list"   = "当前播放列表";
 "NAS_add_audio_to_play_list"   = "添加播放列表";
+"NAS_newer_guide_video"   = "新手视频";
+"NAS_newer_guide_video_to_world"   = "为您打开新世界的大门";
+"NAS_newer_guide_video_tip1"   = "您可以在"; //您可以在【我的>新手引导】查看操作教程
+"NAS_newer_guide_video_tip2"   = "【我的>新手引导】";
+"NAS_newer_guide_video_tip3"   = "查看操作教程";
+"NAS_newer_guide_not_newer"   = "我不是新手";
+"NAS_newer_guide_go_see"   = "立即观看";
 
 "cloudPhone_enter_tip"   = "进入云机";
 "cloudPhone_upload_app"   = "应用上传";