ソースを参照

1.文件下载预览页面

huangxiaodong 1 年間 前
コミット
4cd43f5558

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

@@ -214,6 +214,10 @@
 		6B5D401B2B4A9850000965CF /* couldPhoneFolderListModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B5D40192B4A9850000965CF /* couldPhoneFolderListModel.m */; };
 		6B5D40232B4AA7BF000965CF /* downLoadPreviewViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B5D40212B4AA7BF000965CF /* downLoadPreviewViewController.h */; };
 		6B5D40242B4AA7BF000965CF /* downLoadPreviewViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B5D40222B4AA7BF000965CF /* downLoadPreviewViewController.m */; };
+		6B5D40272B4BC402000965CF /* couldPhoneFileListModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B5D40252B4BC402000965CF /* couldPhoneFileListModel.h */; };
+		6B5D40282B4BC402000965CF /* couldPhoneFileListModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B5D40262B4BC402000965CF /* couldPhoneFileListModel.m */; };
+		6B5D402F2B4BCBC1000965CF /* downLoadPreViewCell.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B5D402D2B4BCBC1000965CF /* downLoadPreViewCell.h */; };
+		6B5D40302B4BCBC1000965CF /* downLoadPreViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B5D402E2B4BCBC1000965CF /* downLoadPreViewCell.m */; };
 		6B72724B2B0AF59200C03F87 /* uploadFileRecordTableViewHeadView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B7272492B0AF59200C03F87 /* uploadFileRecordTableViewHeadView.h */; };
 		6B72724C2B0AF59200C03F87 /* uploadFileRecordTableViewHeadView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B72724A2B0AF59200C03F87 /* uploadFileRecordTableViewHeadView.m */; };
 		6B72724F2B0B58E500C03F87 /* uploadFileRecordEditBottomView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B72724D2B0B58E500C03F87 /* uploadFileRecordEditBottomView.h */; };
@@ -629,6 +633,10 @@
 		6B5D40192B4A9850000965CF /* couldPhoneFolderListModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = couldPhoneFolderListModel.m; sourceTree = "<group>"; };
 		6B5D40212B4AA7BF000965CF /* downLoadPreviewViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = downLoadPreviewViewController.h; sourceTree = "<group>"; };
 		6B5D40222B4AA7BF000965CF /* downLoadPreviewViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = downLoadPreviewViewController.m; sourceTree = "<group>"; };
+		6B5D40252B4BC402000965CF /* couldPhoneFileListModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = couldPhoneFileListModel.h; sourceTree = "<group>"; };
+		6B5D40262B4BC402000965CF /* couldPhoneFileListModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = couldPhoneFileListModel.m; sourceTree = "<group>"; };
+		6B5D402D2B4BCBC1000965CF /* downLoadPreViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = downLoadPreViewCell.h; sourceTree = "<group>"; };
+		6B5D402E2B4BCBC1000965CF /* downLoadPreViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = downLoadPreViewCell.m; sourceTree = "<group>"; };
 		6B7272492B0AF59200C03F87 /* uploadFileRecordTableViewHeadView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = uploadFileRecordTableViewHeadView.h; sourceTree = "<group>"; };
 		6B72724A2B0AF59200C03F87 /* uploadFileRecordTableViewHeadView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = uploadFileRecordTableViewHeadView.m; sourceTree = "<group>"; };
 		6B72724D2B0B58E500C03F87 /* uploadFileRecordEditBottomView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = uploadFileRecordEditBottomView.h; sourceTree = "<group>"; };
@@ -908,6 +916,8 @@
 				6B5D40142B47F27A000965CF /* couldPhoneCommonModel.m */,
 				6B5D40182B4A9850000965CF /* couldPhoneFolderListModel.h */,
 				6B5D40192B4A9850000965CF /* couldPhoneFolderListModel.m */,
+				6B5D40252B4BC402000965CF /* couldPhoneFileListModel.h */,
+				6B5D40262B4BC402000965CF /* couldPhoneFileListModel.m */,
 			);
 			path = Model;
 			sourceTree = "<group>";
@@ -1414,12 +1424,22 @@
 		6B5D401C2B4AA70C000965CF /* downLoadFile */ = {
 			isa = PBXGroup;
 			children = (
+				6B5D402C2B4BCB74000965CF /* view */,
 				6B5D40212B4AA7BF000965CF /* downLoadPreviewViewController.h */,
 				6B5D40222B4AA7BF000965CF /* downLoadPreviewViewController.m */,
 			);
 			path = downLoadFile;
 			sourceTree = "<group>";
 		};
+		6B5D402C2B4BCB74000965CF /* view */ = {
+			isa = PBXGroup;
+			children = (
+				6B5D402D2B4BCBC1000965CF /* downLoadPreViewCell.h */,
+				6B5D402E2B4BCBC1000965CF /* downLoadPreViewCell.m */,
+			);
+			path = view;
+			sourceTree = "<group>";
+		};
 		6BBB35D42AE7645200E4A59B /* BackgroundKeepAlive */ = {
 			isa = PBXGroup;
 			children = (
@@ -1934,6 +1954,7 @@
 				6B1FBD3E2B46875300926382 /* backupsFileRecordCell.h in Headers */,
 				186820192AB94877005702A6 /* GuideLastView.h in Headers */,
 				6B0582632AFF4B7D00D37290 /* PhotoPreviewViewController.h in Headers */,
+				6B5D402F2B4BCBC1000965CF /* downLoadPreViewCell.h in Headers */,
 				6B0581AD2AFCF57300D37290 /* AJPhotoGroupView.h in Headers */,
 				18F9CB072ABD7835003FF71A /* QRCodeScanForChangeDeviceViewController.h in Headers */,
 				18664FF62AC2B3A4008F8A61 /* ShearDeviceUDPManager.h in Headers */,
@@ -1943,6 +1964,7 @@
 				18FCE5392AD1351B0020F623 /* PlayerViewController.h in Headers */,
 				6BF52CA62AD7D3BE00A617DB /* customLaunchView.h in Headers */,
 				183AE7C72A8CB39100B11CB0 /* SafeForKey.h in Headers */,
+				6B5D40272B4BC402000965CF /* couldPhoneFileListModel.h in Headers */,
 				6B5B606E2B3D7E3B009A2AE2 /* fileTransferPathCheckViewController.h in Headers */,
 				186820252AB9B5BF005702A6 /* SetPWDFirstViewController.h in Headers */,
 			);
@@ -2254,6 +2276,7 @@
 				18E557212A3C5D75005CC84B /* Calculator.m in Sources */,
 				A003F6ED27D84D9C00715CBF /* HWWebViewController.m in Sources */,
 				A031DD6D27EC1FCD00909527 /* HWBookmarkListCell.m in Sources */,
+				6B5D40302B4BCBC1000965CF /* downLoadPreViewCell.m in Sources */,
 				183AE6052A89CE3C00B11CB0 /* JSONModelError.m in Sources */,
 				6B7B65592AD9227700BE8CB3 /* PlayerViewController+otherDelegate.mm in Sources */,
 				A08A950027E9A4E400C544BB /* FMDatabaseQueue.m in Sources */,
@@ -2271,6 +2294,7 @@
 				183AE6592A8A2CF000B11CB0 /* AFSecurityPolicy.m in Sources */,
 				18E557262A3C6088005CC84B /* SetUsePWDViewController.m in Sources */,
 				183AE6D52A8CAFAE00B11CB0 /* UIView+View.m in Sources */,
+				6B5D40282B4BC402000965CF /* couldPhoneFileListModel.m in Sources */,
 				183AE64E2A8A2CF000B11CB0 /* AFNetworkActivityIndicatorManager.m in Sources */,
 				6B7272582B0DAF7600C03F87 /* couldPhoneBaseInfoModel.m in Sources */,
 				6B0581B32AFE02B100D37290 /* uploadFileBottomView.m in Sources */,

+ 157 - 4
创维盒子/双子星云手机/Class/Set/uploadFile/downLoadFile/downLoadPreviewViewController.m

@@ -6,9 +6,13 @@
 //
 
 #import "downLoadPreviewViewController.h"
+#import "couldPhoneFileListModel.h"
+#import "downLoadPreViewCell.h"
 
-@interface downLoadPreviewViewController ()
-
+@interface downLoadPreviewViewController ()<UITableViewDelegate,UITableViewDataSource>
+@property (nonatomic, strong) UITableView *tableView;
+@property (nonatomic, strong) UIButton *rightButton;
+@property(nonatomic,strong) couldPhoneFileListModel *curCouldPhoneFileListMod;
 @end
 
 @implementation downLoadPreviewViewController
@@ -17,19 +21,155 @@
     [super viewDidLoad];
     // Do any additional setup after loading the view.
     
-    self.titleLabel.text = NSLocalizedString(@"my_set_no_File_Transfer_List",nil) ;
-    
     [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];
+    
+    [self drawAnyView];
+}
+
+- (void)drawAnyView{
+    
+    _rightButton = [[UIButton alloc] init];
+    [_rightButton setTitle:NSLocalizedString(@"File_upload_Record_select_all",nil) forState:UIControlStateNormal];
+    [_rightButton setTitle:NSLocalizedString(@"File_upload_cancel_select_all",nil) forState:UIControlStateSelected];
+    
+    [_rightButton setTitleColor:[UIColor hwColor:@"#01B7EA" alpha:1.0] forState:UIControlStateNormal];
+    _rightButton.titleLabel.font = [UIFont systemFontOfSize:18.0];
+    _rightButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentRight;
+    [_rightButton addTarget:self action:@selector(didClickSelectAllButton:) forControlEvents:UIControlEventTouchUpInside];
+    [self.navBarBGView addSubview:_rightButton];
+    
+    
+    
+    [_rightButton mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.width.mas_equalTo(120);
+        make.height.mas_equalTo(40);
+        make.right.mas_equalTo(-15);
+        make.centerY.mas_equalTo(self.titleLabel.mas_centerY);
+    }];
+    
+    [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(0);
+        make.top.equalTo(self.navBarBGView.mas_bottom).offset(10.f);
+    }];
+    
+}
+
+#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;
+        }
+        
+    }
+    
+    return _tableView;
+}
+
+
+#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) {
+        [weakSelf userCheckFilePreviewByRow:row];
+    };
+    
+    return cell;
+}
+
+- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
+    return 70;
+}
+
+- (void)userCheckFilePreviewByRow:(NSInteger)row
+{
+    if(row < _curCouldPhoneFileListMod.data.list.count){
+        couldPhoneFileModel* fileModel = _curCouldPhoneFileListMod.data.list[row];
+         fileModel.isSelectType = YES;
+        [self.tableView reloadData];
+    }
+}
+
+- (void)didClickSelectAllButton:(UIButton*)button
+{
+    button.selected = !button.selected;
+    
+    for (couldPhoneFileModel* fileModel in _curCouldPhoneFileListMod.data.list) {
+        fileModel.isSelectType = button.selected;
+    }
+    
+    [self.tableView reloadData];
 }
 
 - (void)viewWillAppear:(BOOL)animated
 {
     [super viewWillAppear:animated];
     
+    if(_isPhotoType){
+        self.titleLabel.text = NSLocalizedString(@"my_set_no_image_upload",nil) ;
+    }
+    else{
+        self.titleLabel.text = NSLocalizedString(@"my_set_no_video_upload",nil) ;
+    }
+    
     [self searchFileListFun];
 }
 
@@ -39,4 +179,17 @@
     [[NSNotificationCenter defaultCenter] postNotificationName:searchFileListBeginNotification object:curNum];/*发送通知*/
 }
 
+- (void)searchFileListDoneFun:(NSNotification*)notification
+{
+    NSDictionary *dataDict = [notification object];
+    
+    if(!dataDict || ![dataDict isKindOfClass:[NSDictionary class]]){
+        return;
+    }
+    
+    _curCouldPhoneFileListMod = [[couldPhoneFileListModel alloc] initWithDictionary:dataDict error:nil];
+    
+    [self.tableView reloadData];
+}
+
 @end

+ 28 - 0
创维盒子/双子星云手机/Class/Set/uploadFile/downLoadFile/view/downLoadPreViewCell.h

@@ -0,0 +1,28 @@
+//
+//  downLoadPreViewCell.h
+//  隐私保护
+//
+//  Created by xd h on 2024/1/8.
+//
+
+#import <UIKit/UIKit.h>
+#import "couldPhoneFileListModel.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface downLoadPreViewCell : UITableViewCell
+@property(nonatomic,strong)UIView *lineView;
+@property(nonatomic,strong)UIView *cellBgView;
+@property(nonatomic,strong)UIImageView *mImageView;
+@property(nonatomic,strong)UILabel *titleLabel;
+@property(nonatomic,strong)UILabel *titleLabel2;
+@property(nonatomic,strong)UIImageView *rightImage;
+@property(nonatomic, strong) CALayer* bgViewLayer;
+@property(nonatomic, strong) UIButton *checkButton;
+
+@property (nonatomic,copy) void (^didClickSwitch)(BOOL SwitchOn);
+
+@property(nonatomic,strong) couldPhoneFileModel*curFileModel;
+@end
+
+NS_ASSUME_NONNULL_END

+ 179 - 0
创维盒子/双子星云手机/Class/Set/uploadFile/downLoadFile/view/downLoadPreViewCell.m

@@ -0,0 +1,179 @@
+//
+//  downLoadPreViewCell.m
+//  隐私保护
+//
+//  Created by xd h on 2024/1/8.
+//
+
+#import "downLoadPreViewCell.h"
+
+
+@implementation downLoadPreViewCell
+@synthesize cellBgView;
+@synthesize mImageView;
+@synthesize titleLabel;
+@synthesize titleLabel2;
+@synthesize rightImage;
+@synthesize lineView;
+@synthesize checkButton;
+
+- (void)awakeFromNib {
+    [super awakeFromNib];
+    // Initialization code
+}
+
+- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
+{
+    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
+    
+    if (self)
+    {
+        [self drawView];
+    }
+    
+    return self;
+}
+
+- (void)drawView
+{
+    cellBgView = [[UIView alloc] init];
+    [self.contentView addSubview:cellBgView];
+    cellBgView.backgroundColor = [UIColor whiteColor];
+    [cellBgView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(15.f);
+        make.top.mas_equalTo(0);
+        make.bottom.mas_equalTo(0);
+        make.width.mas_equalTo(SCREEN_W - 2*15.f);
+    }];
+    
+    /*图片*/
+    mImageView = [[UIImageView alloc] init];
+    [mImageView setBackgroundColor:[UIColor clearColor]];
+    mImageView.image = [UIImage imageNamed:@"uploadFile_image"];
+    [cellBgView addSubview:mImageView];
+    [mImageView setContentMode:(UIViewContentModeScaleAspectFill)];
+    [mImageView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(15);
+        make.width.mas_equalTo(36);
+        make.height.mas_equalTo(36);
+        make.centerY.equalTo(cellBgView.mas_centerY);
+    }];
+    
+    /*右侧箭头*/
+    rightImage = [[UIImageView alloc] init];
+    [rightImage setBackgroundColor:[UIColor clearColor]];
+    [rightImage setImage:[UIImage imageNamed:@"cell_right_access"]];
+    [cellBgView addSubview:rightImage];
+    [rightImage mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.width.mas_equalTo(28);
+        make.right.mas_equalTo(-15.f);
+        make.height.mas_equalTo(28);
+        make.centerY.equalTo(cellBgView.mas_centerY);
+    }];
+    
+    checkButton = [[UIButton alloc] init];
+    [checkButton setImage:[UIImage imageNamed:@"upload_file_uncheck"] forState:UIControlStateNormal];
+    [checkButton setImage:[UIImage imageNamed:@"upload_file_check"] forState:UIControlStateSelected];
+    [cellBgView addSubview:checkButton];
+    
+    [checkButton mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.right.mas_equalTo(-18.f);
+        make.centerY.equalTo(cellBgView.mas_centerY);
+        make.width.mas_equalTo(36.f);
+        make.height.mas_equalTo(36.f);
+    }];
+    
+    [checkButton addTarget:self action:@selector(maskSwitchPressed:) forControlEvents:(UIControlEventTouchUpInside)];
+    
+    
+    /**标题*/
+    titleLabel = [[UILabel alloc] init];
+    [cellBgView addSubview:titleLabel];
+    titleLabel.font = [UIFont boldSystemFontOfSize:14.f];
+    titleLabel.numberOfLines = 0;
+    [titleLabel setTextColor:HW0A132BColor];
+    [titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.equalTo(mImageView.mas_right).offset(5.f);
+        make.right.equalTo(checkButton.mas_left).offset(-5.f);
+        make.centerY.equalTo(cellBgView.mas_centerY);
+        //make.top.mas_equalTo(15.f);
+    }];
+    
+    /**副标题*/
+    titleLabel2 = [[UILabel alloc] init];
+    [cellBgView addSubview:titleLabel2];
+    titleLabel2.font = [UIFont systemFontOfSize:12.f];
+    //[titleLabel2 setTextAlignment:(NSTextAlignmentRight)];
+    [titleLabel2 setTextColor:HW666666Color];
+    [titleLabel2 mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.right.mas_equalTo(-53.f);
+        make.left.mas_equalTo(titleLabel.mas_left);
+        //make.centerY.equalTo(cellBgView.mas_centerY);
+        make.bottom.mas_equalTo(-15);
+    }];
+    
+    lineView = [[UIView alloc] init];
+    [lineView setBackgroundColor:HW979797Color10];
+    [cellBgView addSubview:lineView];
+    [lineView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.right.mas_equalTo(-15.f);
+        make.left.mas_equalTo(15.f);
+        make.bottom.mas_equalTo(0);
+        make.height.mas_equalTo(1.f);
+    }];
+    
+    
+    //titleLabel2.text = @"2023/10/22";
+}
+
+- (void)maskSwitchPressed:(UIButton *)maskSwitch{
+    if(_didClickSwitch){
+        _didClickSwitch(maskSwitch.selected);
+    }
+}
+
+- (void)setCurFileModel:(couldPhoneFileModel *)curFileModel
+{
+    mImageView.image = [UIImage imageNamed:@"uploadFile_image"];
+    checkButton.selected = curFileModel.isSelectType;
+
+    
+    //时间戳转换为日期
+    NSString *timeStr = [[NSString alloc] initWithFormat:@"%ld",curFileModel.time];
+    NSString *dateStr = [iTools getDateStringWithTimeStr:timeStr];
+    
+    NSString * totalSizeStr = nil;
+    NSInteger totalSize_k = curFileModel.length / 1024;
+    if(totalSize_k < 1024){
+        totalSizeStr = [[NSString alloc] initWithFormat:@"%ldKB",totalSize_k];
+    }
+    else if( totalSize_k >= 1024 && totalSize_k < 1024*1024){
+        totalSizeStr = [[NSString alloc] initWithFormat:@"%.1fMB",totalSize_k/1024.0];
+        
+    }
+    else{
+        totalSizeStr = [[NSString alloc] initWithFormat:@"%.2fG",totalSize_k/1024.0/1024.0];
+    }
+    
+    NSString * leftStr = curFileModel.name;
+    NSString * rightStr = [[NSString alloc] initWithFormat:@"\n%@      %@",dateStr,totalSizeStr];
+    
+    
+    NSString *totalStr = [[NSString alloc] initWithFormat:@"%@%@",leftStr,rightStr];
+    
+    NSMutableAttributedString *noteStr = [[NSMutableAttributedString alloc] initWithString:totalStr];
+    
+    NSRange redRange = NSMakeRange([totalStr rangeOfString:rightStr].location, [totalStr rangeOfString:rightStr].length);
+    [noteStr addAttribute:NSForegroundColorAttributeName value:[UIColor hwColor:@"#666666" alpha:1.0] range:redRange];
+    [noteStr addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:12.0] range:redRange];
+    // 设置行间距
+    NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
+    [paragraphStyle setLineSpacing:5];        //设置行间距
+    
+    [noteStr addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0, [totalStr  length])];
+    
+    
+    titleLabel.attributedText = noteStr;
+}
+
+@end

+ 1 - 1
创维盒子/双子星云手机/Class/Set/uploadFile/fileTransfeSet/fileTransferPathCheckViewController.m

@@ -155,7 +155,7 @@
         [cell setAccessoryType:(UITableViewCellAccessoryNone)];
         
         [cell.bgViewLayer removeFromSuperlayer];
-        [cell.titleLabel2 setHidden:NO];
+        [cell.titleLabel2 setHidden:YES];
         [cell.rightImage setHidden:YES];
         [cell.lineView setHidden:NO];
         [cell.checkButton setHidden:NO];

+ 2 - 2
创维盒子/双子星云手机/Class/Set/uploadFile/fileTransfeSet/view/fileTransferPathCheckTableViewCell.m

@@ -95,7 +95,7 @@
     [titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
         make.left.equalTo(mImageView.mas_right).offset(5.f);
         make.right.equalTo(checkButton.mas_left).offset(-5.f);
-        //make.centerY.equalTo(cellBgView.mas_centerY);
+        make.centerY.equalTo(cellBgView.mas_centerY);
         make.top.mas_equalTo(15.f);
     }];
     
@@ -123,7 +123,7 @@
     }];
     
     
-    titleLabel2.text = @"2023/10/22";
+    //titleLabel2.text = @"2023/10/22";
 }
 
 - (void)maskSwitchPressed:(UIButton *)maskSwitch{

+ 49 - 0
创维盒子/双子星云手机/CloudPlayer/Model/couldPhoneFileListModel.h

@@ -0,0 +1,49 @@
+//
+//  couldPhoneFileListModel.h
+//  隐私保护
+//
+//  Created by xd h on 2024/1/8.
+//
+
+#import "SuperModel.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+//{
+//  "type":"search",
+//  "data":{
+//      "status":0,          --接口状态 1 失败 0 成功
+//      "msg":"xxxxxxx",     --接口状态描述 success 成功 failed失败
+//      "list":[
+//          "fileType":"xxx",  --文件类型
+//          "length":"xxx",    --文件长度
+//          "name":"xxx",      --文件名
+//          "path":"xxx"       --文件路径
+//          "time":1692844579000   --创建文件时间戳 (毫秒)
+//      ]
+//  }
+//}
+
+@interface couldPhoneFileModel : SuperModel
+@property (nonatomic, copy) NSString * fileType;
+@property (nonatomic, copy) NSString * path;
+@property (nonatomic, copy) NSString * name;
+@property (nonatomic, assign) long  length;
+@property (nonatomic, assign) long time;
+
+//自定义
+@property (nonatomic, assign) BOOL isSelectType;
+@end
+
+@protocol couldPhoneFileModel;
+@interface couldPhoneFileArrModel : SuperModel
+@property (nonatomic, strong) NSArray<couldPhoneFileModel>* list;
+@end
+
+
+@interface couldPhoneFileListModel : SuperModel
+@property (nonatomic, strong) couldPhoneFileArrModel* data;
+@property (nonatomic, copy) NSString * type;
+@end
+
+NS_ASSUME_NONNULL_END

+ 20 - 0
创维盒子/双子星云手机/CloudPlayer/Model/couldPhoneFileListModel.m

@@ -0,0 +1,20 @@
+//
+//  couldPhoneFileListModel.m
+//  隐私保护
+//
+//  Created by xd h on 2024/1/8.
+//
+
+#import "couldPhoneFileListModel.h"
+
+@implementation couldPhoneFileModel
+
+@end
+
+@implementation couldPhoneFileArrModel
+
+@end
+
+@implementation couldPhoneFileListModel
+
+@end

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

@@ -250,6 +250,6 @@
 }
 - (void)searchFileListResponseFun:(NSDictionary *)dataDict
 {
-    
+    [[NSNotificationCenter defaultCenter] postNotificationName:searchFileListDoneNotification object:dataDict];/*发送通知*/
 }
 @end

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

@@ -743,6 +743,9 @@ ComontAlretViewControllerDelegate>
             else if ([messageType isEqualToString:@"getBackupPath"]){/*创建文件夹*/
                 [weakSelf getFolderListResponseFun:dataDict];
             }
+            else if ([messageType isEqualToString:@"search"]){/*创建文件夹*/
+                [weakSelf searchFileListResponseFun:dataDict];
+            }
         } failure:^(NSError *error) {
             [self showNetErrorAlertFun:2];
         }];

+ 3 - 0
创维盒子/双子星云手机/Helpers/iTools.h

@@ -155,6 +155,9 @@ NS_ASSUME_NONNULL_BEGIN
 + (UIViewController *)appRootViewController;
 //压缩图片对对应尺寸
 + (UIImage*)OriginImage:(UIImage *)image scaleToSize:(CGSize)size;
+
+// 时间戳转时间,时间戳为13位是精确到毫秒的,10位精确到秒
++ (NSString *)getDateStringWithTimeStr:(NSString* )str;
 @end
 
 NS_ASSUME_NONNULL_END

+ 16 - 0
创维盒子/双子星云手机/Helpers/iTools.m

@@ -1020,5 +1020,21 @@ static const char encodingTable[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopq
     return scaledImage;   //返回的就是已经改变的图片
 }
 
+// 时间戳转时间,时间戳为13位是精确到毫秒的,10位精确到秒
++ (NSString *)getDateStringWithTimeStr:(NSString* )str{
+    NSTimeInterval time= [str doubleValue];//传入的时间戳str如果是精确到毫秒的记得要/1000
+    
+    if(str.length == 13){//传入的时间戳str如果是精确到毫秒的记得要/1000
+        time = time/1000;
+    }
+    
+    NSDate *detailDate=[NSDate dateWithTimeIntervalSince1970:time];
+    NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; //实例化一个NSDateFormatter对象
+    //设定时间格式,这里可以设置成自己需要的格式
+    //[dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss SS"];
+    [dateFormatter setDateFormat:@"yyyy-MM-dd"];
+    NSString *currentDateStr = [dateFormatter stringFromDate: detailDate];
+    return currentDateStr;
+}
 
 @end