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

1.nas我的空间UI 数据交互完成

huangxiaodong 1 год назад
Родитель
Сommit
40f60b487c

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

@@ -536,6 +536,14 @@
 		6B6317A32BFD9DB500FF4FB4 /* ZFCustomControlView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B6317A02BFD9DB500FF4FB4 /* ZFCustomControlView.h */; };
 		6B6317A42BFD9DB500FF4FB4 /* ZFCustomControlView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B6317A12BFD9DB500FF4FB4 /* ZFCustomControlView.m */; };
 		6B6317A52BFD9DB500FF4FB4 /* ZFCustomControlView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B6317A12BFD9DB500FF4FB4 /* ZFCustomControlView.m */; };
+		6B679DEA2C252A4E00D0DC03 /* NASMySpaceViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B679DE82C252A4E00D0DC03 /* NASMySpaceViewController.h */; };
+		6B679DEB2C252A4E00D0DC03 /* NASMySpaceViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B679DE92C252A4E00D0DC03 /* NASMySpaceViewController.m */; };
+		6B679DEC2C252A4E00D0DC03 /* NASMySpaceViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B679DE82C252A4E00D0DC03 /* NASMySpaceViewController.h */; };
+		6B679DED2C252A4E00D0DC03 /* NASMySpaceViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B679DE92C252A4E00D0DC03 /* NASMySpaceViewController.m */; };
+		6B679DF02C252ED000D0DC03 /* NASMySpaceTableViewCell.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B679DEE2C252ED000D0DC03 /* NASMySpaceTableViewCell.h */; };
+		6B679DF12C252ED000D0DC03 /* NASMySpaceTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B679DEF2C252ED000D0DC03 /* NASMySpaceTableViewCell.m */; };
+		6B679DF22C252ED000D0DC03 /* NASMySpaceTableViewCell.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B679DEE2C252ED000D0DC03 /* NASMySpaceTableViewCell.h */; };
+		6B679DF32C252ED000D0DC03 /* NASMySpaceTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B679DEF2C252ED000D0DC03 /* NASMySpaceTableViewCell.m */; };
 		6B6ABEDA2BFF3AA400480BAC /* receiveView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B6ABED82BFF3AA400480BAC /* receiveView.h */; };
 		6B6ABEDB2BFF3AA400480BAC /* receiveView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B6ABED92BFF3AA400480BAC /* receiveView.m */; };
 		6B6ABEDC2BFF3AA400480BAC /* receiveView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B6ABED82BFF3AA400480BAC /* receiveView.h */; };
@@ -1618,6 +1626,10 @@
 		6B63179B2BFD8CA000FF4FB4 /* videoPlayByAVPlayerViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = videoPlayByAVPlayerViewController.m; sourceTree = "<group>"; };
 		6B6317A02BFD9DB500FF4FB4 /* ZFCustomControlView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZFCustomControlView.h; sourceTree = "<group>"; };
 		6B6317A12BFD9DB500FF4FB4 /* ZFCustomControlView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZFCustomControlView.m; sourceTree = "<group>"; };
+		6B679DE82C252A4E00D0DC03 /* NASMySpaceViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NASMySpaceViewController.h; sourceTree = "<group>"; };
+		6B679DE92C252A4E00D0DC03 /* NASMySpaceViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NASMySpaceViewController.m; sourceTree = "<group>"; };
+		6B679DEE2C252ED000D0DC03 /* NASMySpaceTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NASMySpaceTableViewCell.h; sourceTree = "<group>"; };
+		6B679DEF2C252ED000D0DC03 /* NASMySpaceTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NASMySpaceTableViewCell.m; sourceTree = "<group>"; };
 		6B6ABED82BFF3AA400480BAC /* receiveView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = receiveView.h; sourceTree = "<group>"; };
 		6B6ABED92BFF3AA400480BAC /* receiveView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = receiveView.m; sourceTree = "<group>"; };
 		6B6ABEDE2BFF3DD000480BAC /* receiveHeadView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = receiveHeadView.h; sourceTree = "<group>"; };
@@ -2802,6 +2814,8 @@
 				6B5D866A2C22AE0B008D25EA /* view */,
 				6B5D86642C227C71008D25EA /* NASViewController.h */,
 				6B5D86652C227C71008D25EA /* NASViewController.m */,
+				6B679DE82C252A4E00D0DC03 /* NASMySpaceViewController.h */,
+				6B679DE92C252A4E00D0DC03 /* NASMySpaceViewController.m */,
 				6B5D867D2C22EA5B008D25EA /* lastFileManager.h */,
 				6B5D867E2C22EA5B008D25EA /* lastFileManager.m */,
 			);
@@ -2813,6 +2827,8 @@
 			children = (
 				6B5D866B2C22AE2B008D25EA /* NASMySpaceView.h */,
 				6B5D866C2C22AE2B008D25EA /* NASMySpaceView.m */,
+				6B679DEE2C252ED000D0DC03 /* NASMySpaceTableViewCell.h */,
+				6B679DEF2C252ED000D0DC03 /* NASMySpaceTableViewCell.m */,
 				6B5D86712C22C63F008D25EA /* NASCommonUsedView.h */,
 				6B5D86722C22C63F008D25EA /* NASCommonUsedView.m */,
 				6B5D86772C22D6E9008D25EA /* NASLastFileView.h */,
@@ -3383,6 +3399,7 @@
 				6B0582782AFF7C6D00D37290 /* TZAssetModel+imageData.h in Headers */,
 				6B8661DD2BBA578600B19846 /* HaveNoticeView.h in Headers */,
 				6B5D403F2B4CE40F000965CF /* downloadManager.h in Headers */,
+				6B679DF02C252ED000D0DC03 /* NASMySpaceTableViewCell.h in Headers */,
 				6B5D40372B4BEEF8000965CF /* downloadThumbnailManager.h in Headers */,
 				6B9354AD2BF3879200AA8D31 /* shareRecordTableViewCell.h in Headers */,
 				6B0582802B01C67400D37290 /* uploadFileRecordViewController.h in Headers */,
@@ -3418,6 +3435,7 @@
 				6BA08F4F2C01D05B00A2242D /* CWFileUploadManager.h in Headers */,
 				6BF0F3D52AD3937B000AA133 /* DeviceThirdIdModel.h in Headers */,
 				6B4C0F722C0314BA0070EF2E /* DFPlayerTool.h in Headers */,
+				6B679DEA2C252A4E00D0DC03 /* NASMySpaceViewController.h in Headers */,
 				6B4C0F622C0314BA0070EF2E /* DFPlayerFileManager.h in Headers */,
 				6B2170982B15CD9200656670 /* NSDictionary+Log.h in Headers */,
 				6B4C0F932C0320710070EF2E /* NSObject+Extensions.h in Headers */,
@@ -3611,6 +3629,7 @@
 				6BD506A52B9576A4006E7CB0 /* TZAssetModel+imageData.h in Headers */,
 				6B8661DE2BBA578600B19846 /* HaveNoticeView.h in Headers */,
 				6BD506A62B9576A4006E7CB0 /* downloadManager.h in Headers */,
+				6B679DF22C252ED000D0DC03 /* NASMySpaceTableViewCell.h in Headers */,
 				6BD506A72B9576A4006E7CB0 /* downloadThumbnailManager.h in Headers */,
 				6B9354AE2BF3879200AA8D31 /* shareRecordTableViewCell.h in Headers */,
 				6BD506A82B9576A4006E7CB0 /* uploadFileRecordViewController.h in Headers */,
@@ -3646,6 +3665,7 @@
 				6BA08F502C01D05B00A2242D /* CWFileUploadManager.h in Headers */,
 				6BD506B82B9576A4006E7CB0 /* DeviceThirdIdModel.h in Headers */,
 				6B4C0F732C0314BA0070EF2E /* DFPlayerTool.h in Headers */,
+				6B679DEC2C252A4E00D0DC03 /* NASMySpaceViewController.h in Headers */,
 				6B4C0F632C0314BA0070EF2E /* DFPlayerFileManager.h in Headers */,
 				6BD506B92B9576A4006E7CB0 /* NSDictionary+Log.h in Headers */,
 				6B4C0F962C0320710070EF2E /* NSObject+Extensions.h in Headers */,
@@ -4286,6 +4306,7 @@
 				6BD507482B9576A4006E7CB0 /* SetUsePWDViewController.m in Sources */,
 				6BD507492B9576A4006E7CB0 /* cloudPhoneCommonModel.m in Sources */,
 				6B2C1E452C070ADE00FDCF82 /* ZFSliderView.m in Sources */,
+				6B679DF32C252ED000D0DC03 /* NASMySpaceTableViewCell.m in Sources */,
 				6B6317A52BFD9DB500FF4FB4 /* ZFCustomControlView.m in Sources */,
 				6BD5074A2B9576A4006E7CB0 /* UIView+View.m in Sources */,
 				6B9354912BF30A8C00AA8D31 /* editTypeBottomView.m in Sources */,
@@ -4295,6 +4316,7 @@
 				6BD5074E2B9576A4006E7CB0 /* couldPhoneBaseInfoModel.m in Sources */,
 				6BD5074F2B9576A4006E7CB0 /* uploadFileBottomView.m in Sources */,
 				6BD507502B9576A4006E7CB0 /* LogoSelectView.m in Sources */,
+				6B679DED2C252A4E00D0DC03 /* NASMySpaceViewController.m in Sources */,
 				6B2C1EA72C070ADE00FDCF82 /* ZFPresentTransition.m in Sources */,
 				6BD507512B9576A4006E7CB0 /* TZAssetModel+imageData.m in Sources */,
 				6BD507522B9576A4006E7CB0 /* diskListTableCell.m in Sources */,
@@ -4596,6 +4618,7 @@
 				18E557262A3C6088005CC84B /* SetUsePWDViewController.m in Sources */,
 				6B3A4B162B6F69A500F74679 /* cloudPhoneCommonModel.m in Sources */,
 				6B2C1E442C070ADE00FDCF82 /* ZFSliderView.m in Sources */,
+				6B679DF12C252ED000D0DC03 /* NASMySpaceTableViewCell.m in Sources */,
 				6B6317A42BFD9DB500FF4FB4 /* ZFCustomControlView.m in Sources */,
 				183AE6D52A8CAFAE00B11CB0 /* UIView+View.m in Sources */,
 				6B93548E2BF30A8C00AA8D31 /* editTypeBottomView.m in Sources */,
@@ -4605,6 +4628,7 @@
 				6B7272582B0DAF7600C03F87 /* couldPhoneBaseInfoModel.m in Sources */,
 				6B0581B32AFE02B100D37290 /* uploadFileBottomView.m in Sources */,
 				181E85012A8F6B1800292B96 /* LogoSelectView.m in Sources */,
+				6B679DEB2C252A4E00D0DC03 /* NASMySpaceViewController.m in Sources */,
 				6B2C1EA62C070ADE00FDCF82 /* ZFPresentTransition.m in Sources */,
 				6B0582792AFF7C6D00D37290 /* TZAssetModel+imageData.m in Sources */,
 				6B45C5092B5FA2DD007E6911 /* diskListTableCell.m in Sources */,

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

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

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


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


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

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

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


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


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

@@ -0,0 +1,16 @@
+//
+//  NASMySpaceViewController.h
+//  双子星云手机
+//
+//  Created by xd h on 2024/6/21.
+//
+
+#import "BaseViewController.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface NASMySpaceViewController : BaseViewController
+
+@end
+
+NS_ASSUME_NONNULL_END

+ 126 - 0
创维盒子/双子星云手机/NAS/NASMySpaceViewController.m

@@ -0,0 +1,126 @@
+//
+//  NASMySpaceViewController.m
+//  双子星云手机
+//
+//  Created by xd h on 2024/6/21.
+//
+
+#import "NASMySpaceViewController.h"
+#import "NASMySpaceTableViewCell.h"
+
+@interface NASMySpaceViewController ()<UITableViewDelegate,UITableViewDataSource>
+@property (nonatomic, strong) UITableView *tableView;
+@property (nonatomic, strong) NSArray *allDataArr;
+@end
+
+@implementation NASMySpaceViewController
+
+- (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 hwColor:@"#F6F8FA"]];
+    
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(getExtraFilesDoneFun:)  name:getExtraFilesDoneNotification  object:nil];
+    
+    self.titleLabel.text = NSLocalizedString(@"NAS_mySpace_title",nil);
+    [self drawAnyView];
+}
+
+- (void)drawAnyView{
+    
+    [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);
+    }];
+}
+
+#pragma mark - 懒加载
+- (UITableView *)tableView{
+    if (!_tableView) {
+        _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, 0, 0) 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 {
+    return _allDataArr.count;
+}
+
+- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
+    
+    __block NSInteger row = indexPath.row;
+    static NSString *identifier = @"NASMySpaceTableViewCell";
+    
+    NASMySpaceTableViewCell * cell =  [tableView dequeueReusableCellWithIdentifier:identifier];
+    cell.selectionStyle = UITableViewCellSelectionStyleNone;
+    if (!cell){
+        cell = [[NASMySpaceTableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:identifier];
+        [cell setSelectionStyle:UITableViewCellSelectionStyleNone];
+        [cell setBackgroundColor:[UIColor clearColor]];
+       
+    }
+    
+    if(row < _allDataArr.count){
+        cell.extraFileModel = _allDataArr[row];
+    }
+    
+    return cell;
+}
+
+- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
+    return 112 + 15;
+}
+
+
+
+#pragma mark 获取到云机基本新
+- (void)getExtraFilesDoneFun:(NSNotification*)not
+{
+    _allDataArr = ksharedAppDelegate.cloudPhoneExtraFileListMod.data;
+    [_tableView reloadData];
+}
+
+- (void)viewWillAppear:(BOOL)animated
+{
+    [super viewWillAppear:animated];
+    
+    if(!ksharedAppDelegate.cloudPhoneExtraFileListMod.data){
+        _allDataArr = @[];
+        [[webSocketManager shareInstance] getExtraFilesListFun];
+    }
+    else{
+        _allDataArr = ksharedAppDelegate.cloudPhoneExtraFileListMod.data;
+        [_tableView reloadData];
+    }
+}
+@end

+ 5 - 2
创维盒子/双子星云手机/NAS/NASViewController.m

@@ -18,7 +18,7 @@
 #import "fileTransfeSetViewController.h"
 #import "uploadFileRecordViewController.h"
 #import "previewToUploadFileView.h"
-
+#import "NASMySpaceViewController.h"
 
 @interface NASViewController ()<UITableViewDelegate,UITableViewDataSource>
 @property (nonatomic,strong)UITableView*tableView;
@@ -298,7 +298,10 @@
     switch (tag)
     {
         case 1:
-            HLog(@"我的空间")
+            {
+                NASMySpaceViewController *vc = [NASMySpaceViewController new];
+                [self pushViewController:vc animated:YES];
+            }
             break;
         case 10:{
             previewImageOrVideoViewController *vc = [previewImageOrVideoViewController new];

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

@@ -0,0 +1,16 @@
+//
+//  NASMySpaceTableViewCell.h
+//  双子星云手机
+//
+//  Created by xd h on 2024/6/21.
+//
+
+#import <UIKit/UIKit.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface NASMySpaceTableViewCell : UITableViewCell
+@property(nonatomic,strong) cloudPhoneExtraFileModel * extraFileModel;
+@end
+
+NS_ASSUME_NONNULL_END

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

@@ -0,0 +1,217 @@
+//
+//  NASMySpaceTableViewCell.m
+//  双子星云手机
+//
+//  Created by xd h on 2024/6/21.
+//
+
+#import "NASMySpaceTableViewCell.h"
+
+@interface NASMySpaceTableViewCell ()
+@property(nonatomic,strong) UIImageView *typeImageView;
+@property(nonatomic,strong) UILabel *diskNameLabel;
+
+@property(nonatomic,strong) UIView *progressBgView;
+@property(nonatomic,strong) UIView *progressSelectView;
+@property(nonatomic,strong) CAGradientLayer *glayer;
+
+@property(nonatomic,strong) UILabel *totalLabel;
+@property(nonatomic,strong) UILabel *usedlabel;
+@property(nonatomic,strong) UILabel *unuselabel;
+
+@end
+
+
+
+@implementation NASMySpaceTableViewCell
+
+- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
+{
+    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
+    
+    if (self)
+    {
+        [self drawView];
+    }
+    
+    return self;
+}
+
+- (void)drawView
+{
+    UIView *whiteBgView =  [UIView new];
+    whiteBgView.backgroundColor = [UIColor whiteColor];
+    whiteBgView.layer.cornerRadius = 8;
+    whiteBgView.layer.masksToBounds = YES;
+    [self.contentView addSubview:whiteBgView];
+    
+    [whiteBgView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(15);
+        make.right.mas_equalTo(-15);
+        make.height.mas_equalTo(110);
+        make.bottom.mas_equalTo(0);
+    }];
+    
+    _typeImageView = [[UIImageView alloc] init];
+    //_typeImageView.backgroundColor = [UIColor greenColor];
+    [whiteBgView addSubview:_typeImageView];
+    
+    [_typeImageView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(15);
+        make.top.mas_equalTo(15);
+        make.width.mas_equalTo(32);
+        make.height.mas_equalTo(32);
+    }];
+    
+    
+    _diskNameLabel = [[UILabel alloc] init];
+    _diskNameLabel.font = [UIFont systemFontOfSize:14.0];
+    _diskNameLabel.textColor = [UIColor blackColor];
+    //_fileNamelabel.backgroundColor = [UIColor greenColor];
+    [whiteBgView addSubview:_diskNameLabel];
+    
+    [_diskNameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(_typeImageView.mas_right).offset(8);
+        make.right.mas_equalTo(-18);
+        make.centerY.equalTo(_typeImageView.mas_centerY).offset(0);
+        //make.height.mas_equalTo(20);
+    }];
+    
+    
+    _progressBgView = [[UIView alloc] init];
+    _progressBgView.backgroundColor = [UIColor hwColor:@"#F9F9F9" alpha:1.0];
+    _progressBgView.layer.cornerRadius = 3;
+    _progressBgView.layer.masksToBounds = YES;
+    [whiteBgView addSubview:_progressBgView];
+    
+    [_progressBgView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(16);
+        make.right.mas_equalTo(-18);
+        make.height.mas_equalTo(6);
+        make.top.equalTo(_typeImageView.mas_bottom).offset(10);
+    }];
+    
+    _progressSelectView = [[UIView alloc] init];
+    //_progressSelectView.backgroundColor = [UIColor hwColor:@"#F9F9F9" alpha:1.0];
+    _progressSelectView.layer.cornerRadius = 3;
+    _progressSelectView.layer.masksToBounds = YES;
+    [_progressBgView addSubview:_progressSelectView];
+    
+    // gradient
+    _glayer = [CAGradientLayer layer];
+    _glayer.startPoint = CGPointMake(0, 0.5);
+    _glayer.endPoint = CGPointMake(1, 0.5);
+    _glayer.colors = @[(__bridge id)[UIColor hwColor:@"#0BDDFD" alpha:1.0].CGColor, (__bridge id)[UIColor hwColor:@"#048CFB" alpha:1.0].CGColor];
+    _glayer.locations = @[@(0), @(1.0f)];
+    [_progressSelectView.layer addSublayer:_glayer];
+    
+    
+    CGFloat butWidth = (SCREEN_W - 16*2 - 16*2)/3.0;
+    
+    _totalLabel = [[UILabel alloc] init];
+    _totalLabel.font = [UIFont systemFontOfSize:12.0];
+    _totalLabel.textColor = [UIColor hwColor:@"#818CA2"];
+    //_fileNamelabel.backgroundColor = [UIColor greenColor];
+    [whiteBgView addSubview:_totalLabel];
+    
+    [_totalLabel mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(16);
+        make.width.mas_equalTo(butWidth);
+        make.top.mas_equalTo(_progressBgView.mas_bottom).offset(10);
+    }];
+    
+    _usedlabel = [[UILabel alloc] init];
+    _usedlabel.font = [UIFont systemFontOfSize:12.0];
+    _usedlabel.textColor = [UIColor hwColor:@"#818CA2"];
+    _usedlabel.textAlignment = NSTextAlignmentCenter;
+    //_usedlabel.backgroundColor = [UIColor greenColor];
+    [whiteBgView addSubview:_usedlabel];
+    
+    [_usedlabel mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(_totalLabel.mas_right);
+        make.width.mas_equalTo(butWidth);
+        make.top.mas_equalTo(_progressBgView.mas_bottom).offset(10);
+    }];
+    
+    _unuselabel = [[UILabel alloc] init];
+    _unuselabel.font = [UIFont systemFontOfSize:12.0];
+    _unuselabel.textColor = [UIColor hwColor:@"#818CA2"];
+    _unuselabel.textAlignment = NSTextAlignmentRight;
+    //_unuselabel.backgroundColor = [UIColor greenColor];
+    [whiteBgView addSubview:_unuselabel];
+    
+    [_unuselabel mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.right.mas_equalTo(-13);
+        make.width.mas_equalTo(butWidth);
+        make.top.mas_equalTo(_progressBgView.mas_bottom).offset(10);
+    }];
+    
+}
+
+- (void)setExtraFileModel:(cloudPhoneExtraFileModel *)extraFileModel
+{
+    _extraFileModel = extraFileModel;
+    KWeakSelf
+    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+        [weakSelf delayedSetDataFun];
+    });
+    
+}
+
+- (void)delayedSetDataFun
+{
+    if([_extraFileModel.extraPath containsString:@"/sdcard/"]){
+        _typeImageView.image = [UIImage imageNamed:@"nas_disk_phone"];
+        _diskNameLabel.text = NSLocalizedString(@"NAS_cloudPhone_Space",nil);
+    }
+    else{
+        _typeImageView.image = [UIImage imageNamed:@"nas_disk_u"];
+        _diskNameLabel.text = _extraFileModel.name;
+    }
+    
+    long  allExtraAvableSize = _extraFileModel.extraAvableSize;
+    long  allExtraTotalSize = _extraFileModel.extraTotalSize;
+
+    if(allExtraTotalSize == 0){
+        return;
+    }
+    
+    CGFloat rate = allExtraAvableSize/(allExtraTotalSize*1.0);
+    
+    CGRect frame = _progressBgView.bounds;
+    frame.size.width =  frame.size.width * rate;
+    
+    if (!isnan(frame.size.width))
+    {
+        _progressSelectView.frame = frame;
+        _glayer.frame = frame;
+    }
+    
+    // 计算 大小
+    CGFloat extraAvableSizeF = allExtraAvableSize / 1024.0 /1024.0/1024.0;
+    CGFloat extraTotalSizeF = allExtraTotalSize / 1024.0 /1024.0/1024.0;
+    CGFloat extraUsedSizeF = (allExtraTotalSize-allExtraAvableSize) / 1024.0 /1024.0/1024.0;
+    
+    NSString *totalStr  = [[NSString alloc] initWithFormat:@"%@%.1fGB",NSLocalizedString(@"NAS_disk_Total_title",nil),extraTotalSizeF];
+    if(extraTotalSizeF > 1024){
+        extraTotalSizeF = extraTotalSizeF/1024.0;
+        totalStr  = [[NSString alloc] initWithFormat:@"%@%.1fTB",NSLocalizedString(@"NAS_disk_Total_title",nil),extraTotalSizeF];
+    }
+    _totalLabel.text = totalStr;
+    
+    NSString *usedStr  = [[NSString alloc] initWithFormat:@"%@%.1fGB",NSLocalizedString(@"NAS_disk_used_Space",nil),extraUsedSizeF];
+    if(extraTotalSizeF > 1024){
+        extraUsedSizeF = extraUsedSizeF/1024.0;
+        usedStr  = [[NSString alloc] initWithFormat:@"%@%.1fTB",NSLocalizedString(@"NAS_disk_used_Space",nil),extraUsedSizeF];
+    }
+    _usedlabel.text = usedStr;
+    
+    NSString *unusedStr  = [[NSString alloc] initWithFormat:@"%@%.1fGB",NSLocalizedString(@"NAS_disk_unuse_Space",nil),extraAvableSizeF];
+    if(extraAvableSizeF > 1024){
+        extraAvableSizeF = extraAvableSizeF/1024.0;
+        unusedStr  = [[NSString alloc] initWithFormat:@"%@%.1fTB",NSLocalizedString(@"NAS_disk_unuse_Space",nil),extraAvableSizeF];
+    }
+    _unuselabel.text = unusedStr;
+
+}
+@end

+ 18 - 3
创维盒子/双子星云手机/NAS/view/NASMySpaceView.m

@@ -58,11 +58,11 @@
     
     [self setTitleLabelTextFunBy:@"--GB/--GB"];
     
-    //添加按钮
+    //添加按钮 后面做个大按钮响应
     UIButton *rightButton = [[UIButton alloc] init];
     [rightButton setBackgroundImage:[UIImage imageNamed:@"common_right_arrow"] forState:UIControlStateNormal];
-    rightButton.tag = 1;
-    [rightButton addTarget:self action:@selector(didClickButtonFun:) forControlEvents:UIControlEventTouchUpInside];
+//    rightButton.tag = 1;
+//    [rightButton addTarget:self action:@selector(didClickButtonFun:) forControlEvents:UIControlEventTouchUpInside];
     [whiteBgView addSubview:rightButton];
     
     [rightButton mas_makeConstraints:^(MASConstraintMaker *make) {
@@ -102,6 +102,21 @@
 //        [self setProgressFun];
 //    });
     
+    //大按钮响应
+    UIButton *bigRightButton = [[UIButton alloc] init];
+    bigRightButton.tag = 1;
+    [bigRightButton addTarget:self action:@selector(didClickButtonFun:) forControlEvents:UIControlEventTouchUpInside];
+    [whiteBgView addSubview:bigRightButton];
+    //bigRightButton.backgroundColor= [UIColor redColor];
+    
+    [bigRightButton mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.top.mas_equalTo(16);
+        make.left.mas_equalTo(0);
+        make.right.mas_equalTo(0);
+        make.bottom.equalTo(_progressSelectView.mas_bottom).offset(0);
+    }];
+    
+    
     NSArray *titleArr = @[NSLocalizedString(@"my_set_no_image_upload",nil),
                           NSLocalizedString(@"my_set_no_video_upload",nil),
                           NSLocalizedString(@"my_set_no_music",nil),

+ 3 - 2
创维盒子/双子星云手机/cloudPhone/webSocketManager.h

@@ -71,9 +71,10 @@ NS_ASSUME_NONNULL_BEGIN
 - (void)getBackupFolderListFun;
 - (void)searchFileListBeginFun:(NSMutableDictionary *)dict;
 
-#pragma mark 获取云机剩余空间
+#pragma mark 获取云机基本信息
 - (void)getBaseInfoFun;
-
+#pragma mark 获取云机剩余空间(包含外挂磁盘)
+- (void)getExtraFilesListFun;
 
 //上传
 - (void)beginGotoUploadFileFunBy:(uploadFileDataModel *)uploadFileDataMod;

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

@@ -534,6 +534,10 @@
 "tabbar_my_title"   = "我的";
 "NAS_mySpace_title"   = "我的空间";
 "NAS_used_Space"   = "已用空间";
+"NAS_cloudPhone_Space"   = "云机空间";
+"NAS_disk_Total_title"   = "总空间";
+"NAS_disk_used_Space"   = "已使用";
+"NAS_disk_unuse_Space"   = "可用容量";
 "NAS_common_used"   = "常用功能";
 "NAS_last_file"   = "最近文件";
 "NAS_bottom_tip"   = "已经到底了";