Преглед на файлове

1.音频和文档UI编写

huangxiaodong преди 1 година
родител
ревизия
5957c28174

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

@@ -321,6 +321,10 @@
 		6B93549B2BF369D000AA8D31 /* previewToUploadFileView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B9354982BF369D000AA8D31 /* previewToUploadFileView.h */; };
 		6B93549C2BF369D000AA8D31 /* previewToUploadFileView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B9354982BF369D000AA8D31 /* previewToUploadFileView.h */; };
 		6B93549D2BF369D000AA8D31 /* previewToUploadFileView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B9354992BF369D000AA8D31 /* previewToUploadFileView.m */; };
+		6B9354A02BF37D2D00AA8D31 /* previewAudioOrDocumentViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B93549F2BF37D2D00AA8D31 /* previewAudioOrDocumentViewController.m */; };
+		6B9354A12BF37D2D00AA8D31 /* previewAudioOrDocumentViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B93549E2BF37D2D00AA8D31 /* previewAudioOrDocumentViewController.h */; };
+		6B9354A22BF37D2D00AA8D31 /* previewAudioOrDocumentViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B93549E2BF37D2D00AA8D31 /* previewAudioOrDocumentViewController.h */; };
+		6B9354A32BF37D2D00AA8D31 /* previewAudioOrDocumentViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B93549F2BF37D2D00AA8D31 /* previewAudioOrDocumentViewController.m */; };
 		6B97143F2BCD00CA00CE0096 /* ComontAlretType2ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B97143E2BCD00C900CE0096 /* ComontAlretType2ViewController.m */; };
 		6B9714402BCD00CA00CE0096 /* ComontAlretType2ViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B97143D2BCD00C900CE0096 /* ComontAlretType2ViewController.h */; };
 		6B9714412BCD00CA00CE0096 /* ComontAlretType2ViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B97143D2BCD00C900CE0096 /* ComontAlretType2ViewController.h */; };
@@ -1183,6 +1187,8 @@
 		6B9354932BF33F2700AA8D31 /* editShareView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = editShareView.m; sourceTree = "<group>"; };
 		6B9354982BF369D000AA8D31 /* previewToUploadFileView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = previewToUploadFileView.h; sourceTree = "<group>"; };
 		6B9354992BF369D000AA8D31 /* previewToUploadFileView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = previewToUploadFileView.m; sourceTree = "<group>"; };
+		6B93549E2BF37D2D00AA8D31 /* previewAudioOrDocumentViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = previewAudioOrDocumentViewController.h; sourceTree = "<group>"; };
+		6B93549F2BF37D2D00AA8D31 /* previewAudioOrDocumentViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = previewAudioOrDocumentViewController.m; sourceTree = "<group>"; };
 		6B97143D2BCD00C900CE0096 /* ComontAlretType2ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ComontAlretType2ViewController.h; sourceTree = "<group>"; };
 		6B97143E2BCD00C900CE0096 /* ComontAlretType2ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ComontAlretType2ViewController.m; sourceTree = "<group>"; };
 		6BA533362B16E65500D1CB5C /* TvStatusModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TvStatusModel.h; sourceTree = "<group>"; };
@@ -1947,6 +1953,8 @@
 				6B34DC512BF1C1A3002DD1EF /* view */,
 				6B34DC4B2BF1BA11002DD1EF /* previewImageOrVideoViewController.h */,
 				6B34DC4C2BF1BA11002DD1EF /* previewImageOrVideoViewController.m */,
+				6B93549E2BF37D2D00AA8D31 /* previewAudioOrDocumentViewController.h */,
+				6B93549F2BF37D2D00AA8D31 /* previewAudioOrDocumentViewController.m */,
 			);
 			path = previewFile;
 			sourceTree = "<group>";
@@ -2613,6 +2621,7 @@
 				6B9714402BCD00CA00CE0096 /* ComontAlretType2ViewController.h in Headers */,
 				18EC79DC2ABC109F0084836A /* SetPWDSecondViewController.h in Headers */,
 				6B0582852B0457C400D37290 /* uploadFileManager.h in Headers */,
+				6B9354A12BF37D2D00AA8D31 /* previewAudioOrDocumentViewController.h in Headers */,
 				6B467BB92BC7F7D70039A6A6 /* fileUploadToFileCenterModel.h in Headers */,
 				6BFF268C2AF8E1C600FCB4F7 /* forgetPwdViewController.h in Headers */,
 				6BF52C992AD5546500A617DB /* Reachability.h in Headers */,
@@ -2750,6 +2759,7 @@
 				6B9714412BCD00CA00CE0096 /* ComontAlretType2ViewController.h in Headers */,
 				6BD506EB2B9576A4006E7CB0 /* SetPWDSecondViewController.h in Headers */,
 				6BD506EC2B9576A4006E7CB0 /* uploadFileManager.h in Headers */,
+				6B9354A22BF37D2D00AA8D31 /* previewAudioOrDocumentViewController.h in Headers */,
 				6B467BBB2BC7F7D70039A6A6 /* fileUploadToFileCenterModel.h in Headers */,
 				6BD506ED2B9576A4006E7CB0 /* forgetPwdViewController.h in Headers */,
 				6BD506EE2B9576A4006E7CB0 /* Reachability.h in Headers */,
@@ -3353,6 +3363,7 @@
 				6BD507C12B9576A4006E7CB0 /* FLAnimatedImageView.m in Sources */,
 				6BEA31772BB65606005167AA /* clearCacheAlretViewController.m in Sources */,
 				6BD507C22B9576A4006E7CB0 /* DeviceThirdIdModel.m in Sources */,
+				6B9354A32BF37D2D00AA8D31 /* previewAudioOrDocumentViewController.m in Sources */,
 				6BD507C32B9576A4006E7CB0 /* HidenMaskSetViewController.m in Sources */,
 				6BD507C42B9576A4006E7CB0 /* filePathCreatTableViewCell.m in Sources */,
 				6BD507C52B9576A4006E7CB0 /* commandSendCheckModel.m in Sources */,
@@ -3575,6 +3586,7 @@
 				A003F6C127D841FF00715CBF /* FLAnimatedImageView.m in Sources */,
 				6BEA31762BB65606005167AA /* clearCacheAlretViewController.m in Sources */,
 				6BF0F3D62AD3937B000AA133 /* DeviceThirdIdModel.m in Sources */,
+				6B9354A02BF37D2D00AA8D31 /* previewAudioOrDocumentViewController.m in Sources */,
 				184C8ACD2A94557200F26650 /* HidenMaskSetViewController.m in Sources */,
 				6B5B607B2B3E71B6009A2AE2 /* filePathCreatTableViewCell.m in Sources */,
 				6B1CC2CF2B6B6D6B00AD4217 /* commandSendCheckModel.m in Sources */,

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

@@ -38,6 +38,7 @@
 #import "customShareManageTool.h"
 
 #import "previewImageOrVideoViewController.h"
+#import "previewAudioOrDocumentViewController.h"
 
 @interface MySetViewController ()<HelpDownScrollViewDelegate,UITableViewDelegate,UITableViewDataSource,ComontAlretViewControllerDelegate>
 {
@@ -179,7 +180,16 @@
         }
             break;
         case 102:{
-            [[customShareManageTool sharedManager] shareType:3 withShareUrl:@"https://baidu.com" withShareTitle:@"我是标题" withShareContent:@"我是测试内容"];
+            //[[customShareManageTool sharedManager] shareType:3 withShareUrl:@"https://baidu.com" withShareTitle:@"我是标题" withShareContent:@"我是测试内容"];
+            previewAudioOrDocumentViewController *vc = [previewAudioOrDocumentViewController new];
+            vc.isAudioType = YES;
+            [self.navigationController pushViewController:vc animated:YES];
+        }
+            break;
+        case 103:{
+            previewAudioOrDocumentViewController *vc = [previewAudioOrDocumentViewController new];
+            vc.isAudioType = NO;
+            [self.navigationController pushViewController:vc animated:YES];
         }
             break;
             

+ 16 - 0
创维盒子/双子星云手机/Class/Set/previewFile/previewAudioOrDocumentViewController.h

@@ -0,0 +1,16 @@
+//
+//  previewAudioOrDocumentViewController.h
+//  双子星云手机
+//
+//  Created by xd h on 2024/5/14.
+//
+
+#import "BaseViewController.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface previewAudioOrDocumentViewController : BaseViewController
+@property (nonatomic,assign) BOOL isAudioType;//是否为选择图片类型
+@end
+
+NS_ASSUME_NONNULL_END

+ 846 - 0
创维盒子/双子星云手机/Class/Set/previewFile/previewAudioOrDocumentViewController.m

@@ -0,0 +1,846 @@
+//
+//  previewAudioOrDocumentViewController.m
+//  双子星云手机
+//
+//  Created by xd h on 2024/5/14.
+//
+
+#import "previewAudioOrDocumentViewController.h"
+
+#import "couldPhoneFileListModel.h"
+#import "downloadThumbnailManager.h"
+#import "downloadManager.h"
+#import "uploadFileRecordViewController.h"
+#import "UIScrollView+EmptyDataSet.h"
+#import "diskListBgView.h"
+#import "diskListTableView.h"
+#import "downLoadPreViewCell.h"
+#import "editTypeHeadView.h"
+#import "editTypeBottomView.h"
+#import "editShareView.h"
+#import "previewToUploadFileView.h"
+
+@interface previewAudioOrDocumentViewController ()<UITableViewDelegate,UITableViewDataSource,DZNEmptyDataSetSource, DZNEmptyDataSetDelegate>
+{
+    UIButton *tapBtn;
+    
+    UIButton* rightTransferListButton;//传输列表
+    UIView* rightRedView;
+    
+    BOOL hadUploadTaskType;
+    BOOL hadDownloadTaskType;
+}
+@property (nonatomic, strong) UITableView *tableView;
+
+@property (strong, nonatomic) UILabel *MytitleLabel;
+@property (strong, nonatomic) UIImageView *selectTip;
+@property (nonatomic, strong) diskListBgView *diskListBgV;
+@property (nonatomic, strong) diskListTableView *diskListTableV;
+@property (nonatomic, strong)  NSMutableArray*diskListArr;
+@property (nonatomic, copy) NSString *defaultDiskPath;
+@property(nonatomic,assign) BOOL isEditType;
+@property(nonatomic,strong) editTypeHeadView*curEditTypeHeadView;
+@property(nonatomic,strong) editTypeBottomView*curEditTypeBottomView;
+@property(nonatomic,strong) UIButton*uploadFileButton;
+
+@property(nonatomic,strong) couldPhoneFileListModel *curCouldPhoneFileListMod;
+@property (nonatomic, strong)  NSMutableArray*didSelectListArr;//选中的数据
+@end
+
+@implementation previewAudioOrDocumentViewController
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    // Do any additional setup after loading the view.
+    
+    [self.toolBar setHidden:YES];
+    [self.navigationBar setHidden:YES];
+    [self.navBarBGView setHidden:NO];
+    self.navBarBGView.backgroundColor = [UIColor whiteColor];
+    [self.view setBackgroundColor:[UIColor whiteColor]];
+    
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(searchFileListDoneFun:) name:searchFileListDoneNotification object:nil];
+    
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didDownloadOneFileFun) name:downloadThumbnailDoneOneNotification object:nil];
+    
+    [self drawAnyView];
+    
+    _didSelectListArr = [NSMutableArray new];
+}
+
+- (void)drawAnyView{
+    
+    [self initNavHeadUIFun];
+    
+    _curEditTypeHeadView = [[editTypeHeadView alloc] init];
+    _curEditTypeHeadView.hidden = YES;
+    [self.navBarBGView addSubview:_curEditTypeHeadView];
+    
+    [_curEditTypeHeadView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(0);
+        make.right.mas_equalTo(0);
+        make.bottom.mas_equalTo(0);
+        make.height.mas_equalTo(NAVIHEIGHT - AdaptNaviHeight);
+    }];
+    
+#pragma mark 编辑状态的 取消 和全选按钮 响应事件
+    KWeakSelf
+    _curEditTypeHeadView.didClickButtonFun = ^(NSInteger tag) {
+        if(tag==1){
+            [weakSelf userCancelEditTypeFun];
+        }
+    };
+    
+    _curEditTypeHeadView.didClickSelectAllFun = ^(UIButton * _Nonnull but) {
+        [weakSelf didClickSelectAllButton:but];
+    };
+    
+    
+    _curEditTypeBottomView = [[editTypeBottomView alloc] init];
+    _curEditTypeBottomView.hidden = YES;
+    [self.view addSubview:_curEditTypeBottomView];
+    
+    [_curEditTypeBottomView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(0);
+        make.right.mas_equalTo(0);
+        make.bottom.mas_equalTo(0);
+        make.height.mas_equalTo(60 + AdaptTabHeight);
+    }];
+    
+#pragma mark 编辑状态的 下载 分享 删除 响应事件
+    _curEditTypeBottomView.didClickButtonFun = ^(NSInteger tag) {
+        if(tag==1){
+            [[iToast makeText:@"点击下载"] show];
+        }
+        else if(tag==2){
+            [weakSelf gotoShareViewFun];
+        }
+        else if(tag==3){
+            [[iToast makeText:@"点击删除"] show];
+        }
+    };
+    
+    [self.view addSubview:self.tableView];
+    [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(0);
+        make.right.mas_equalTo(0);
+        //make.bottom.mas_equalTo(-(safeArea));
+        make.bottom.mas_equalTo(0);
+        make.top.equalTo(self.navBarBGView.mas_bottom).offset(10.f);
+    }];
+    
+    //大+号
+    _uploadFileButton = [[UIButton alloc] init];
+    [_uploadFileButton setBackgroundImage:[UIImage imageNamed:@"add_file_icon"] forState:UIControlStateNormal];
+    [_uploadFileButton addTarget:self action:@selector(userDidClickUploadViewFun) forControlEvents:UIControlEventTouchUpInside];
+    [self.view addSubview:_uploadFileButton];
+    [_uploadFileButton mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.right.mas_equalTo(-15);
+        make.width.mas_equalTo(52);
+        make.height.mas_equalTo(52);
+        make.bottom.mas_equalTo(-30 - AdaptTabHeight);
+    }];
+    
+    NSMutableArray *arr = [NSMutableArray new];
+    NSArray *diskList = ksharedAppDelegate.cloudPhoneExtraFileListMod.data;
+    if(diskList && [diskList isKindOfClass:[NSArray class]]){
+        for (cloudPhoneExtraFileModel *model in diskList) {
+            model.isCheckType = NO;
+            [arr addObject:model];
+        }
+    }
+    
+    if(arr.count >0){
+        cloudPhoneExtraFileModel *model = arr.firstObject;
+        model.isCheckType = YES;
+        _defaultDiskPath = model.extraPath;
+    }
+    _diskListArr = arr;
+    [self setTitleAfterGetdiskFun];
+}
+
+- (void)initNavHeadUIFun
+{
+    //title
+    UILabel *titleLabel = [[UILabel alloc] init];
+    titleLabel.textAlignment = NSTextAlignmentCenter;
+    titleLabel.font = [UIFont boldSystemFontOfSize:16.0];
+    titleLabel.textColor = [UIColor blackColor];
+    titleLabel.translatesAutoresizingMaskIntoConstraints = NO;
+    [self.navBarBGView addSubview:titleLabel];
+
+    self.MytitleLabel = titleLabel;
+    
+    //selectTipImageView
+    UIImageView *selectTip = [[UIImageView alloc] init];
+    selectTip.image = [UIImage imageNamed:@"upload_image_arrow"];
+    selectTip.translatesAutoresizingMaskIntoConstraints = NO;
+    [self.navBarBGView addSubview:selectTip];
+    self.selectTip = selectTip;
+    
+    tapBtn = [UIButton buttonWithType:UIButtonTypeCustom];
+    tapBtn.backgroundColor = [UIColor clearColor];
+    tapBtn.translatesAutoresizingMaskIntoConstraints = NO;
+    [tapBtn addTarget:self action:@selector(selectDiskAction:) forControlEvents:UIControlEventTouchUpInside];
+    [self.navBarBGView addSubview:tapBtn];
+    
+    [tapBtn mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.centerX.mas_equalTo(self.navBarBGView.mas_centerX);
+        make.centerY.mas_equalTo(self.backBtn.mas_centerY);
+        make.width.mas_equalTo(100);
+        make.height.mas_equalTo(30);
+    }];
+    
+    [self setTitleLabelText:@""];
+    
+    rightTransferListButton = [[UIButton alloc] init];
+    [rightTransferListButton setImage:[UIImage imageNamed:@"icon_file_transfer"] forState:UIControlStateNormal];
+    [rightTransferListButton addTarget:self action:@selector(didiClikRightButGotoTransferListFun:) forControlEvents:UIControlEventTouchUpInside];
+    [self.navBarBGView addSubview:rightTransferListButton];
+    
+    [rightTransferListButton mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.width.mas_equalTo(40);
+        make.height.mas_equalTo(40);
+        make.right.mas_equalTo(-15);
+        make.centerY.mas_equalTo(self.titleLabel.mas_centerY);
+    }];
+    
+    rightRedView = [[UIView alloc] init];
+    rightRedView.backgroundColor = [UIColor hwColor:@"#DD4E4E" alpha:1.0];
+    [rightTransferListButton addSubview:rightRedView];
+    rightRedView.layer.cornerRadius = 7;
+    rightRedView.hidden = YES;
+    
+    [rightRedView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.width.mas_equalTo(14);
+        make.height.mas_equalTo(14);
+        make.right.mas_equalTo(0);
+        make.top.mas_equalTo(6);
+    }];
+    
+}
+
+
+#pragma mark - 懒加载
+- (UITableView *)tableView{
+    if (!_tableView) {
+        _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_W, SCREEN_H - TABBARHEIGHT) style:UITableViewStylePlain];
+        _tableView.delegate = self;
+        _tableView.dataSource = self;
+        _tableView.showsVerticalScrollIndicator = NO;
+        _tableView.showsHorizontalScrollIndicator = NO;
+//        _tableView.contentInset = UIEdgeInsetsMake(-H_STATE_BAR, 0, 0, 0);
+        [_tableView setSeparatorStyle:(UITableViewCellSeparatorStyleNone)];
+        [_tableView setSeparatorColor:[UIColor clearColor]];
+        [_tableView setBackgroundColor:[UIColor clearColor]];
+        [_tableView setTableFooterView:[UIView new]];
+        [_tableView setBounces:YES];
+        
+        if (@available(iOS 15.0, *)) {
+            _tableView.sectionHeaderTopPadding = 0;
+        }
+        
+        //空数据引入第三方开源处理
+        _tableView.emptyDataSetSource = self;
+        _tableView.emptyDataSetDelegate = self;
+    }
+    
+    return _tableView;
+}
+
+
+- (diskListBgView*)diskListBgV
+{
+    if(!_diskListBgV){
+        _diskListBgV = [[diskListBgView alloc] initWithFrame:CGRectMake(0, 0, 0, 0)];
+        _diskListBgV.hidden = YES;
+        [self.view addSubview:_diskListBgV];
+        
+        KWeakSelf
+        _diskListBgV.didTapWhitePlace = ^{
+            [weakSelf hideDiskListVieFun];
+        };
+        
+        [_diskListBgV mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.left.mas_equalTo(0);
+            make.bottom.mas_equalTo(0);
+            make.right.mas_equalTo(0);
+            make.top.mas_equalTo(self.navBarBGView.mas_bottom);
+        }];
+        
+        [self.view addSubview:self.diskListTableV];
+        self.diskListTableV.hidden = YES;
+        [self.diskListTableV mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.left.mas_equalTo(0);
+            make.height.mas_equalTo(3*70);
+            make.right.mas_equalTo(0);
+            make.top.mas_equalTo(self.navBarBGView.mas_bottom);
+        }];
+       
+        self.diskListTableV.diskListArr = _diskListArr;
+        
+        self.diskListTableV.didClickDiskModel = ^(NSString * _Nonnull checkPath) {
+            [weakSelf didCheckDiskFunByPath:checkPath];
+        };
+    }
+    
+    return  _diskListBgV;
+}
+
+- (UITableView *)diskListTableV{
+    if (!_diskListTableV) {
+        _diskListTableV = [[diskListTableView alloc] init];
+//
+    }
+    return _diskListTableV;
+}
+
+#pragma mark 选中磁盘
+- (void)didCheckDiskFunByPath:(NSString*)pathStr
+{
+    if(self.defaultDiskPath
+       && self.defaultDiskPath.length>0
+       && ![self.defaultDiskPath isEqualToString:pathStr]){
+        //切换硬盘了 取消全选
+        
+        //_rightSelectAllButton.selected = YES;
+        //[self didClickSelectAllButton:_rightSelectAllButton];
+    }
+    
+    self.defaultDiskPath = pathStr;
+    //[self searchFileListFun];
+    [self setTitleAfterGetdiskFun];
+    [self hideDiskListVieFun];
+}
+
+#pragma mark - 列表委托
+- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
+    return 1;
+}
+
+- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+    if(!_curCouldPhoneFileListMod){
+        return 0;
+    }
+    return _curCouldPhoneFileListMod.data.list.count;
+}
+
+- (downLoadPreViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
+    
+    __block NSInteger row = indexPath.row;
+    static NSString *identifier = @"downLoadPreViewCell";
+    
+    downLoadPreViewCell * cell =  [tableView dequeueReusableCellWithIdentifier:identifier];
+    cell.selectionStyle = UITableViewCellSelectionStyleNone;
+    if (!cell){
+        cell = [[downLoadPreViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:identifier];
+        [cell setSelectionStyle:UITableViewCellSelectionStyleNone];
+        [cell setBackgroundColor:[UIColor clearColor]];
+        [cell setAccessoryType:(UITableViewCellAccessoryNone)];
+        
+        [cell.bgViewLayer removeFromSuperlayer];
+        [cell.titleLabel2 setHidden:NO];
+        [cell.rightImage setHidden:YES];
+        [cell.lineView setHidden:YES];
+        [cell.checkButton setHidden:NO];
+        
+    }
+    
+    if(row < _curCouldPhoneFileListMod.data.list.count){
+        couldPhoneFileModel* fileModel = _curCouldPhoneFileListMod.data.list[row];
+        cell.curFileModel = fileModel;
+        
+        KWeakSelf
+        cell.didClickSwitch = ^(BOOL SwitchOn) {
+            if([weakSelf userCheckFileModel:fileModel withShowTip:YES]){
+                [weakSelf userCheckFilePreviewByRow:row];
+            }
+        };
+    }
+    return cell;
+}
+
+- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
+    return 70;
+}
+
+#pragma mark 空数据
+- (UIImage *)imageForEmptyDataSet:(UIScrollView *)scrollView {
+    
+    NSString *imageName = @"uploadFile_noData";
+    
+    return [UIImage imageNamed:imageName];
+}
+
+- (NSAttributedString *)titleForEmptyDataSet:(UIScrollView *)scrollView {
+    NSString *text = NSLocalizedString(@"File_download_file_no_data",nil);
+    
+    NSDictionary *attributes = @{NSFontAttributeName: [UIFont systemFontOfSize:16.0f],
+                                 NSForegroundColorAttributeName: HW999999Color};
+    
+    return [[NSAttributedString alloc] initWithString:text attributes:attributes];
+}
+
+//调整图片位置
+- (CGFloat)verticalOffsetForEmptyDataSet:(UIScrollView *)scrollView {
+    return -150;
+}
+
+//ios端:
+//1、需求说明:解决除MP4   MOV   3GP   M4V 总计4种格式外,其他格式下载失败的问题;
+//2、交互说明:下载列表勾选文件中含有其他格式,toast提示“IOS系统仅支持MP4、MOV、3GP、M4V 的视频格式,其他格式无法下载”。点击下载按钮,过滤其他格式文件,仅下载MP4、MOV、3GP、M4V 的视频格式文件;
+
+//ios支持图片格式: (SVG 不支持)
+//需求说明:解决除JPG  PNG  GIF TIFF  BMP总计5种格式外,其他格式下载失败的问题
+//视觉交互:选择文件中含有其他格式,toast提示“IOS系统仅支持JPG 、PNG、GIF、TIFF、BMP的图片格式,其他格式无法下载”。点击下载按钮,过滤其他格式文件,仅下载JPG 、PNG、GIF、TIFF、BMP的图片格式文件;
+
+- (BOOL)userCheckFileModel:(couldPhoneFileModel*)fileModel withShowTip:(BOOL)canShow{
+    NSString*name = [fileModel.name lowercaseString];
+    NSArray *nameArr = [name componentsSeparatedByString:@"."];
+    if(nameArr.count >0 && !_isAudioType){
+        BOOL canDownLoadType = NO;
+        
+        NSString *lastName = nameArr.lastObject;
+        if([lastName isEqualToString:@"mp4"]
+           ||[lastName isEqualToString:@"mov"]
+           ||[lastName isEqualToString:@"3gp"]
+           ||[lastName isEqualToString:@"m4v"]){
+            canDownLoadType = YES;
+        }
+        
+        if(!canDownLoadType){
+            if(canShow){
+                [[iToast makeText:NSLocalizedString(@"download_video_disable_state",nil)] show];
+            }
+            
+            return NO;
+        }
+    }
+    
+    if(nameArr.count >0 && _isAudioType){
+        BOOL canDownLoadType = NO;
+        //JPG 、PNG、GIF、TIFF、BMP
+        NSString *lastName = nameArr.lastObject;
+        if([lastName isEqualToString:@"jpg"]
+           ||[lastName isEqualToString:@"png"]
+           ||[lastName isEqualToString:@"gif"]
+           ||[lastName isEqualToString:@"tiff"]
+           ||[lastName isEqualToString:@"bmp"]
+           ||[lastName isEqualToString:@"heic"]
+           ||[lastName isEqualToString:@"jpeg"]
+           ||[lastName isEqualToString:@"heif"]){
+            canDownLoadType = YES;
+        }
+        
+        if(!canDownLoadType){
+            if(canShow){
+                [[iToast makeText:NSLocalizedString(@"download_image_disable_state",nil)] show];
+            }
+            return NO;
+        }
+    }
+    
+    return YES;
+}
+
+#pragma mark 用户长按图片进入编辑
+- (void)setViewEditTypeFun
+{
+    _isEditType = YES;
+    [self.tableView  reloadData];
+    
+    _curEditTypeHeadView.hidden = NO;
+    _curEditTypeBottomView.hidden = NO;
+    _uploadFileButton.hidden = YES;
+    
+    [self.tableView mas_remakeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(0);
+        make.right.mas_equalTo(0);
+        make.bottom.mas_equalTo(_curEditTypeBottomView.mas_top);
+        make.top.equalTo(self.navBarBGView.mas_bottom).offset(10.f);
+    }];
+}
+
+#pragma mark 用户取消编辑编辑
+- (void)userCancelEditTypeFun
+{
+    _isEditType = NO;
+    [self.tableView  reloadData];
+    
+    _curEditTypeHeadView.hidden = YES;
+    _curEditTypeBottomView.hidden = YES;
+    _uploadFileButton.hidden = NO;
+    
+    [self.tableView  mas_remakeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(0);
+        make.right.mas_equalTo(0);
+        make.bottom.mas_equalTo(0);
+        make.top.equalTo(self.navBarBGView.mas_bottom).offset(10.f);
+    }];
+}
+
+- (void)userCheckFilePreviewByRow:(NSInteger)row
+{
+    if(row < _curCouldPhoneFileListMod.data.list.count){
+        couldPhoneFileModel* fileModel = _curCouldPhoneFileListMod.data.list[row];
+        
+        if(fileModel.isSelectType){
+            [_didSelectListArr removeObject:fileModel];
+        }
+        else{
+            [_didSelectListArr addObject:fileModel];
+        }
+        
+         fileModel.isSelectType = !fileModel.isSelectType;
+        //[self.tableView reloadData];
+        //[self.dataCollectionView reloadData];
+        [self setEditTypeTitleFun];
+    }
+}
+
+- (void)didClickSelectAllButton:(UIButton*)button
+{
+    //button.selected = !button.selected;
+    BOOL isNeedShowTip = NO;
+    
+    [_didSelectListArr removeAllObjects];
+    
+    for (couldPhoneFileModel* fileModel in _curCouldPhoneFileListMod.data.list) {
+        
+        if(!button.selected){
+            fileModel.isSelectType = button.selected;
+        }
+        else{
+            [_didSelectListArr addObject:fileModel];
+            if([self userCheckFileModel:fileModel withShowTip:NO]){
+                fileModel.isSelectType = button.selected;
+            }
+            else{
+                isNeedShowTip = YES;
+            }
+        }
+        
+    }
+    
+    if(isNeedShowTip){
+        if(_isAudioType){
+            [[iToast makeText:NSLocalizedString(@"download_image_disable_state",nil)] show];
+        }
+        else{
+            [[iToast makeText:NSLocalizedString(@"download_video_disable_state",nil)] show];
+        }
+    }
+    
+    [self.tableView reloadData];
+    //[self.dataCollectionView reloadData];
+    [self setEditTypeTitleFun];
+}
+
+#pragma mark 设置选中标题
+- (void)setEditTypeTitleFun
+{
+    [_curEditTypeHeadView setTitleLabetextByNumbers:_didSelectListArr.count];
+    
+    if(_didSelectListArr.count > 0){
+        [self  setViewEditTypeFun];
+    }
+    else{
+        [self userCancelEditTypeFun];
+    }
+}
+
+#pragma mark 用户点击分享
+- (void)gotoShareViewFun
+{
+    editShareView *editShareV = [[editShareView alloc] init];
+    [self.view addSubview:editShareV];
+    
+    [editShareV mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(0);
+        make.right.mas_equalTo(0);
+        make.bottom.mas_equalTo(0);
+        make.top.mas_equalTo(0);
+    }];
+}
+
+#pragma mark 用户点击上传文件
+- (void)userDidClickUploadViewFun
+{
+    previewToUploadFileView *previewToUploadFileV = [[previewToUploadFileView alloc] init];
+    [self.view addSubview:previewToUploadFileV];
+    
+    [previewToUploadFileV mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(0);
+        make.right.mas_equalTo(0);
+        make.bottom.mas_equalTo(0);
+        make.top.mas_equalTo(0);
+    }];
+}
+
+#pragma mark 设置标题
+- (void)setTitleLabelText:(NSString*)title
+{
+    NSArray *diskNameArr = [_defaultDiskPath componentsSeparatedByString:@"/"];
+    if(diskNameArr && diskNameArr.count >= 2){
+        
+        NSString *name = diskNameArr.lastObject;
+        if(name.length == 0)
+        {
+            name = diskNameArr[diskNameArr.count -2];
+        }
+        
+        title = [[NSString alloc] initWithFormat:@"[%@]%@",name,title];
+    }
+    
+    
+    
+    self.MytitleLabel.text = title;
+    
+    CGFloat curWidth = [title boundingRectWithSize:CGSizeMake(SCREEN_W, 30) options:(NSStringDrawingUsesLineFragmentOrigin) attributes:@{NSFontAttributeName:[UIFont boldSystemFontOfSize:16.f]} context:nil].size.width;
+    
+    curWidth += 20;
+    //HLog(@"title w:%f",curWidth);
+    [self.MytitleLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
+        make.centerX.mas_equalTo(self.navBarBGView.mas_centerX).offset(-10);
+        make.centerY.mas_equalTo(self.backBtn.mas_centerY);
+        make.width.mas_equalTo(curWidth);
+        make.height.mas_equalTo(30);
+    }];
+    //self.MytitleLabel.backgroundColor = [UIColor greenColor];
+    
+    [self.selectTip mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(self.MytitleLabel.mas_right).offset(0);
+        make.centerY.mas_equalTo(self.backBtn.mas_centerY);
+        make.width.mas_equalTo(15);
+        make.height.mas_equalTo(15);
+    }];
+    
+    [tapBtn mas_remakeConstraints:^(MASConstraintMaker *make) {
+        make.centerX.mas_equalTo(self.navBarBGView.mas_centerX);
+        make.centerY.mas_equalTo(self.backBtn.mas_centerY);
+        make.width.mas_equalTo(curWidth+15);
+        make.height.mas_equalTo(30);
+    }];
+}
+
+#pragma mark 选择硬盘
+- (void)selectDiskAction:(UIButton*)but
+{
+    if(self.diskListBgV.hidden){
+        [self showDiskListVieFun];
+    }
+    else{
+        [self hideDiskListVieFun];
+        
+    }
+}
+
+- (void)showDiskListVieFun
+{
+    self.diskListBgV.hidden = NO;
+    self.diskListTableV.hidden = NO;
+    
+    [UIView animateWithDuration:0.3 animations:^{
+        CGRect rect = self.diskListTableV.frame;
+        rect.origin.y = CGRectGetMaxY(self.navBarBGView.frame);
+        self.diskListTableV.frame = rect;
+
+        self.selectTip.transform = CGAffineTransformMakeRotation(M_PI);
+    }];
+}
+
+- (void)hideDiskListVieFun
+{
+    self.diskListBgV.hidden = YES;
+    
+    [UIView animateWithDuration:0.3 animations:^{
+        self.diskListTableV.hidden = YES;
+        self.selectTip.transform = CGAffineTransformIdentity;
+        
+    }completion:^(BOOL finished) {
+        CGRect rect = self.diskListTableV.frame;
+        rect.origin.y = 0;
+        self.diskListTableV.frame = rect;
+    }];
+}
+
+
+
+#pragma mark 设置标题
+- (void)setTitleAfterGetdiskFun
+{
+    if(_isAudioType){
+        //self.titleLabel.text = NSLocalizedString(@"my_set_no_image_upload",nil) ;
+        [self setTitleLabelText:NSLocalizedString(@"my_set_no_image_upload",nil)];
+    }
+    else{
+        //self.titleLabel.text = NSLocalizedString(@"my_set_no_video_upload",nil) ;
+        [self setTitleLabelText:NSLocalizedString(@"my_set_no_video_upload",nil)];
+    }
+    
+    [self searchFileListFun];
+}
+
+- (void)viewWillAppear:(BOOL)animated
+{
+    [super viewWillAppear:animated];
+    
+    
+}
+
+- (void)viewDidAppear:(BOOL)animated{
+    [super viewDidAppear:animated];
+    [self showDownloadTipFun];
+    [self checkFileTransferTask];
+}
+
+- (void)viewWillDisappear:(BOOL)animated{
+    [super viewWillDisappear:animated];
+    
+    //[self removeNewIndicator];
+    [self removeNewIndicatorHaveStr];
+}
+
+- (void)searchFileListFun
+{
+    NSMutableDictionary *dict = [NSMutableDictionary new];
+    NSNumber *curNum = [NSNumber numberWithBool:_isAudioType];
+    [dict setObject:curNum forKey:@"type"];
+    if(!_defaultDiskPath){
+        _defaultDiskPath = @"";
+    }
+    [dict setObject:_defaultDiskPath forKey:@"path"];
+    
+    [[NSNotificationCenter defaultCenter] postNotificationName:searchFileListBeginNotification object:dict];/*发送通知*/
+    
+    //[self showNewIndicatorWithCanBack:YES canTouch:NO];
+    [self showNewIndicatorHaveStrWithCanBack:YES canTouch:NO showText:NSLocalizedString(@"common_loading_tip",nil)];
+    
+}
+
+- (void)searchFileListDoneFun:(NSNotification*)notification
+{
+    //[self removeNewIndicator];
+    [self removeNewIndicatorHaveStr];
+    
+    NSDictionary *dataDict = [notification object];
+    
+    if(!dataDict || ![dataDict isKindOfClass:[NSDictionary class]]){
+        return;
+    }
+    
+    _curCouldPhoneFileListMod = [[couldPhoneFileListModel alloc] initWithDictionary:dataDict error:nil];
+    
+    NSMutableArray *filterArr = [NSMutableArray new];
+    for (couldPhoneFileModel*model in _curCouldPhoneFileListMod.data.list) {
+        //if(model.length > 1024)
+        if(model.length > 1024*50)
+        {
+            [filterArr addObject:model];
+        }
+    }
+    
+    _curCouldPhoneFileListMod.data.list = filterArr;
+    
+    [self.tableView reloadData];
+    //[self.dataCollectionView reloadData];
+    
+    //这个要做判断 不能为空
+    [self gotoDownThumbnailManagerFun];
+}
+
+
+#pragma mark 去下载缩略图
+- (void)gotoDownThumbnailManagerFun
+{
+//    if(_curCouldPhoneFileListMod.data.list && _curCouldPhoneFileListMod.data.list.count >0){
+//        [[downloadThumbnailManager shareInstance] handlToDownloadThumbnailWith:_curCouldPhoneFileListMod.data.list];
+//    }
+}
+
+- (void)gotoDownloadloadFileRecordFun
+{
+    uploadFileRecordViewController *vc = [uploadFileRecordViewController new];
+    [self.navigationController pushViewController:vc animated:YES];
+    vc.isDownloadingType = YES;
+    //[vc gotoDownloadFile:_downloadFileBottomV.indexPathsForSelectedItems];
+}
+
+- (void)showDownloadTipFun
+{
+    BOOL didReadUploadTipType = [HWDataManager getBoolWithKey:Const_file_downLoad_need_read];
+   
+    if(didReadUploadTipType){
+        return;
+    }
+    
+    
+    //KWeakSelf
+    /*弹窗提示恢复出厂*/
+    ComontAlretViewController *nextVC = [[ComontAlretViewController alloc] initWithTiTle:nil
+                                                                                     msg:NSLocalizedString(@"upload_download_need_read_msg",nil)
+                                                                                imageStr:nil
+                                                                             cancelTitle:NSLocalizedString(@"guide_set_pwd_guide_know",nil)
+                                                                                 okTitle:nil
+                                                                        isOkBtnHighlight:NO
+                                                                              didClickOk:^{
+        
+    } didClickCancel:^{
+        [HWDataManager setBoolWithKey:Const_file_downLoad_need_read value:YES];
+    }];
+    
+    nextVC.modalPresentationStyle = UIModalPresentationCustom;
+    
+    [self presentViewController:nextVC animated:YES completion:^{
+        nextVC.view.superview.backgroundColor = [UIColor clearColor];
+    }];
+    
+}
+
+- (void)didDownloadOneFileFun
+{
+    mainBlock(^{
+        [self.tableView reloadData];
+        //[self.dataCollectionView reloadData];
+    });
+}
+
+
+- (void)checkFileTransferTask
+{//有个偶现的闪退在BGFMDB
+    
+    [[uploadFileManager shareInstance] checkHadUploadTaskWithComplete:^(BOOL isSuccess) {
+        self->hadUploadTaskType = isSuccess;
+        [self setRightButtonRedTypeFun];
+    }];
+    
+    KWeakSelf
+    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+        [[downloadManager shareInstance] checkHadDownloadTaskWithComplete:^(BOOL isSuccess) {
+            self->hadDownloadTaskType = isSuccess;
+            [weakSelf setRightButtonRedTypeFun];
+        }];
+    });
+   
+}
+
+- (void)setRightButtonRedTypeFun
+{
+    mainBlock(^{
+        if(self->hadUploadTaskType || self->hadDownloadTaskType){
+            self->rightRedView.hidden = NO;
+        }
+        else{
+            self->rightRedView.hidden = YES;
+        }
+
+    });
+}
+
+- (void)didiClikRightButGotoTransferListFun:(UIButton*)but
+{
+    uploadFileRecordViewController *vc = [uploadFileRecordViewController new];
+    [self.navigationController pushViewController:vc animated:YES];
+}
+
+@end