Sfoglia il codice sorgente

1.保存数据显示处理

huangxiaodong 1 anno fa
parent
commit
f183e96d60
18 ha cambiato i file con 757 aggiunte e 171 eliminazioni
  1. 26 2
      创维盒子/双子星云手机.xcodeproj/project.pbxproj
  2. 1 1
      创维盒子/双子星云手机/AppDelegate/SceneDelegate.h
  3. 28 5
      创维盒子/双子星云手机/AppDelegate/SceneDelegate.m
  4. 12 0
      创维盒子/双子星云手机/Class/Set/previewFile/model/ShareRecordModel.h
  5. 1 1
      创维盒子/双子星云手机/Class/Set/previewFile/model/queryOneShareModel.h
  6. 1 1
      创维盒子/双子星云手机/Class/Set/uploadFile/downLoadFile/view/downLoadPreViewCell.m
  7. 25 0
      创维盒子/双子星云手机/Class/Set/uploadFile/receiveView/boxReceiveFileRecordCell.h
  8. 322 0
      创维盒子/双子星云手机/Class/Set/uploadFile/receiveView/boxReceiveFileRecordCell.m
  9. 6 5
      创维盒子/双子星云手机/Class/Set/uploadFile/receiveView/receiveSaveRecordTableView.h
  10. 154 147
      创维盒子/双子星云手机/Class/Set/uploadFile/receiveView/receiveSaveRecordTableView.m
  11. 1 0
      创维盒子/双子星云手机/Class/Set/uploadFile/receiveView/receiveView.h
  12. 21 0
      创维盒子/双子星云手机/Class/Set/uploadFile/receiveView/receiveView.m
  13. 27 0
      创维盒子/双子星云手机/Class/Set/uploadFile/uploadFileManager/boxSaveFileManager.h
  14. 102 0
      创维盒子/双子星云手机/Class/Set/uploadFile/uploadFileManager/boxSaveFileManager.m
  15. 2 0
      创维盒子/双子星云手机/Class/Set/uploadFile/uploadFileRecordViewController.h
  16. 22 9
      创维盒子/双子星云手机/Class/Set/uploadFile/uploadFileRecordViewController.m
  17. BIN
      创维盒子/双子星云手机/CloudPlayer/RCCloudPhoneSDK.framework/RCCloudPhoneSDK
  18. 6 0
      创维盒子/双子星云手机/zh-Hans.lproj/Localizable.strings

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

@@ -183,6 +183,10 @@
 		6B1CC2CB2B67A5FC00AD4217 /* USBInsertPopView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B1CC2C92B67A5FC00AD4217 /* USBInsertPopView.m */; };
 		6B1CC2CE2B6B6D6B00AD4217 /* commandSendCheckModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B1CC2CC2B6B6D6B00AD4217 /* commandSendCheckModel.h */; };
 		6B1CC2CF2B6B6D6B00AD4217 /* commandSendCheckModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B1CC2CD2B6B6D6B00AD4217 /* commandSendCheckModel.m */; };
+		6B1F7FCA2C0064B500954720 /* boxReceiveFileRecordCell.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B1F7FC82C0064B400954720 /* boxReceiveFileRecordCell.h */; };
+		6B1F7FCB2C0064B500954720 /* boxReceiveFileRecordCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B1F7FC92C0064B400954720 /* boxReceiveFileRecordCell.m */; };
+		6B1F7FCC2C0064B500954720 /* boxReceiveFileRecordCell.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B1F7FC82C0064B400954720 /* boxReceiveFileRecordCell.h */; };
+		6B1F7FCD2C0064B500954720 /* boxReceiveFileRecordCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B1F7FC92C0064B400954720 /* boxReceiveFileRecordCell.m */; };
 		6B1FBD222B43DAD200926382 /* backupsSetViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B1FBD202B43DAD200926382 /* backupsSetViewController.h */; };
 		6B1FBD232B43DAD200926382 /* backupsSetViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B1FBD212B43DAD200926382 /* backupsSetViewController.m */; };
 		6B1FBD262B4503E700926382 /* photosBackupsTaskModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B1FBD242B4503E700926382 /* photosBackupsTaskModel.h */; };
@@ -361,6 +365,10 @@
 		6B6ABEED2BFF5B2F00480BAC /* receiveSaveRecordTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B6ABEEB2BFF5B2F00480BAC /* receiveSaveRecordTableView.m */; };
 		6B6ABEEE2BFF5B2F00480BAC /* receiveSaveRecordTableView.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B6ABEEA2BFF5B2F00480BAC /* receiveSaveRecordTableView.h */; };
 		6B6ABEEF2BFF5B2F00480BAC /* receiveSaveRecordTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B6ABEEB2BFF5B2F00480BAC /* receiveSaveRecordTableView.m */; };
+		6B6ABEF22BFF6B4C00480BAC /* boxSaveFileManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B6ABEF02BFF6B4C00480BAC /* boxSaveFileManager.h */; };
+		6B6ABEF32BFF6B4C00480BAC /* boxSaveFileManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B6ABEF12BFF6B4C00480BAC /* boxSaveFileManager.m */; };
+		6B6ABEF42BFF6B4C00480BAC /* boxSaveFileManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B6ABEF02BFF6B4C00480BAC /* boxSaveFileManager.h */; };
+		6B6ABEF52BFF6B4C00480BAC /* boxSaveFileManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B6ABEF12BFF6B4C00480BAC /* boxSaveFileManager.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 */; };
@@ -1171,6 +1179,8 @@
 		6B1CC2C92B67A5FC00AD4217 /* USBInsertPopView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = USBInsertPopView.m; sourceTree = "<group>"; };
 		6B1CC2CC2B6B6D6B00AD4217 /* commandSendCheckModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = commandSendCheckModel.h; sourceTree = "<group>"; };
 		6B1CC2CD2B6B6D6B00AD4217 /* commandSendCheckModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = commandSendCheckModel.m; sourceTree = "<group>"; };
+		6B1F7FC82C0064B400954720 /* boxReceiveFileRecordCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = boxReceiveFileRecordCell.h; sourceTree = "<group>"; };
+		6B1F7FC92C0064B400954720 /* boxReceiveFileRecordCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = boxReceiveFileRecordCell.m; sourceTree = "<group>"; };
 		6B1FBD202B43DAD200926382 /* backupsSetViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = backupsSetViewController.h; sourceTree = "<group>"; };
 		6B1FBD212B43DAD200926382 /* backupsSetViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = backupsSetViewController.m; sourceTree = "<group>"; };
 		6B1FBD242B4503E700926382 /* photosBackupsTaskModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = photosBackupsTaskModel.h; sourceTree = "<group>"; };
@@ -1300,6 +1310,8 @@
 		6B6ABEE52BFF49C800480BAC /* receiveDownloadRecordTableView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = receiveDownloadRecordTableView.m; sourceTree = "<group>"; };
 		6B6ABEEA2BFF5B2F00480BAC /* receiveSaveRecordTableView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = receiveSaveRecordTableView.h; sourceTree = "<group>"; };
 		6B6ABEEB2BFF5B2F00480BAC /* receiveSaveRecordTableView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = receiveSaveRecordTableView.m; sourceTree = "<group>"; };
+		6B6ABEF02BFF6B4C00480BAC /* boxSaveFileManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = boxSaveFileManager.h; sourceTree = "<group>"; };
+		6B6ABEF12BFF6B4C00480BAC /* boxSaveFileManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = boxSaveFileManager.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>"; };
@@ -2112,6 +2124,8 @@
 				6B5D403E2B4CE40F000965CF /* downloadManager.m */,
 				6B7272512B0CABC600C03F87 /* cachesFileManager.h */,
 				6B7272522B0CABC600C03F87 /* cachesFileManager.m */,
+				6B6ABEF02BFF6B4C00480BAC /* boxSaveFileManager.h */,
+				6B6ABEF12BFF6B4C00480BAC /* boxSaveFileManager.m */,
 			);
 			path = uploadFileManager;
 			sourceTree = "<group>";
@@ -2331,6 +2345,8 @@
 				6B6ABEE52BFF49C800480BAC /* receiveDownloadRecordTableView.m */,
 				6B6ABEEA2BFF5B2F00480BAC /* receiveSaveRecordTableView.h */,
 				6B6ABEEB2BFF5B2F00480BAC /* receiveSaveRecordTableView.m */,
+				6B1F7FC82C0064B400954720 /* boxReceiveFileRecordCell.h */,
+				6B1F7FC92C0064B400954720 /* boxReceiveFileRecordCell.m */,
 			);
 			path = receiveView;
 			sourceTree = "<group>";
@@ -2899,8 +2915,10 @@
 				6B1CC2CA2B67A5FC00AD4217 /* USBInsertPopView.h in Headers */,
 				6BED888E2B4E901900F76DDC /* downloadFileRecordCell.h in Headers */,
 				184C8ACC2A94557200F26650 /* HidenMaskSetViewController.h in Headers */,
+				6B6ABEF22BFF6B4C00480BAC /* boxSaveFileManager.h in Headers */,
 				6B9714402BCD00CA00CE0096 /* ComontAlretType2ViewController.h in Headers */,
 				18EC79DC2ABC109F0084836A /* SetPWDSecondViewController.h in Headers */,
+				6B1F7FCA2C0064B500954720 /* boxReceiveFileRecordCell.h in Headers */,
 				6B0582852B0457C400D37290 /* uploadFileManager.h in Headers */,
 				6B9354A12BF37D2D00AA8D31 /* previewAudioOrDocumentViewController.h in Headers */,
 				6B467BB92BC7F7D70039A6A6 /* fileUploadToFileCenterModel.h in Headers */,
@@ -3066,8 +3084,10 @@
 				6BD506E82B9576A4006E7CB0 /* USBInsertPopView.h in Headers */,
 				6BD506E92B9576A4006E7CB0 /* downloadFileRecordCell.h in Headers */,
 				6BD506EA2B9576A4006E7CB0 /* HidenMaskSetViewController.h in Headers */,
+				6B6ABEF42BFF6B4C00480BAC /* boxSaveFileManager.h in Headers */,
 				6B9714412BCD00CA00CE0096 /* ComontAlretType2ViewController.h in Headers */,
 				6BD506EB2B9576A4006E7CB0 /* SetPWDSecondViewController.h in Headers */,
+				6B1F7FCC2C0064B500954720 /* boxReceiveFileRecordCell.h in Headers */,
 				6BD506EC2B9576A4006E7CB0 /* uploadFileManager.h in Headers */,
 				6B9354A22BF37D2D00AA8D31 /* previewAudioOrDocumentViewController.h in Headers */,
 				6B467BBB2BC7F7D70039A6A6 /* fileUploadToFileCenterModel.h in Headers */,
@@ -3513,6 +3533,7 @@
 				6BD507172B9576A4006E7CB0 /* fileTransferPopView.m in Sources */,
 				6BD507182B9576A4006E7CB0 /* Reachability.m in Sources */,
 				6BD507192B9576A4006E7CB0 /* ModifyPWDFirstViewController.m in Sources */,
+				6B1F7FCD2C0064B500954720 /* boxReceiveFileRecordCell.m in Sources */,
 				6BD5071A2B9576A4006E7CB0 /* AFURLResponseSerialization.m in Sources */,
 				6BD5071B2B9576A4006E7CB0 /* HWHistoryViewController.m in Sources */,
 				6BD5071C2B9576A4006E7CB0 /* backupsSetViewController.m in Sources */,
@@ -3655,6 +3676,7 @@
 				6BD5078B2B9576A4006E7CB0 /* HelpDownScrollView.m in Sources */,
 				6BD5078C2B9576A4006E7CB0 /* fileSetTableViewCell.m in Sources */,
 				6BD5078D2B9576A4006E7CB0 /* connectDeviceManager.m in Sources */,
+				6B6ABEF52BFF6B4C00480BAC /* boxSaveFileManager.m in Sources */,
 				6BD5078E2B9576A4006E7CB0 /* MineViewCell.m in Sources */,
 				6BD5078F2B9576A4006E7CB0 /* PlayerViewController+AdjustBtnFrame.m in Sources */,
 				6BD507902B9576A4006E7CB0 /* cachesFileManager.m in Sources */,
@@ -3765,6 +3787,7 @@
 				6B5B60612B3BC8DE009A2AE2 /* fileTransferPopView.m in Sources */,
 				6BF52C962AD5546500A617DB /* Reachability.m in Sources */,
 				18F9CAFB2ABD35C4003FF71A /* ModifyPWDFirstViewController.m in Sources */,
+				6B1F7FCB2C0064B500954720 /* boxReceiveFileRecordCell.m in Sources */,
 				183AE6542A8A2CF000B11CB0 /* AFURLResponseSerialization.m in Sources */,
 				A0295B1227ED938B009C5D8B /* HWHistoryViewController.m in Sources */,
 				6B1FBD232B43DAD200926382 /* backupsSetViewController.m in Sources */,
@@ -3907,6 +3930,7 @@
 				181E84F32A8F0A9B00292B96 /* HelpDownScrollView.m in Sources */,
 				6B5B606B2B3D67B2009A2AE2 /* fileSetTableViewCell.m in Sources */,
 				6BF0F3D12AD391D8000AA133 /* connectDeviceManager.m in Sources */,
+				6B6ABEF32BFF6B4C00480BAC /* boxSaveFileManager.m in Sources */,
 				181E84F62A8F451D00292B96 /* MineViewCell.m in Sources */,
 				18FCE5412AD136670020F623 /* PlayerViewController+AdjustBtnFrame.m in Sources */,
 				6B7272542B0CABC600C03F87 /* cachesFileManager.m in Sources */,
@@ -4424,7 +4448,7 @@
 				CODE_SIGN_IDENTITY = "Apple Development";
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
 				CODE_SIGN_STYLE = Manual;
-				CURRENT_PROJECT_VERSION = 7;
+				CURRENT_PROJECT_VERSION = 9;
 				DEVELOPMENT_TEAM = "";
 				"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 6SV76WTUUR;
 				FRAMEWORK_SEARCH_PATHS = (
@@ -4505,7 +4529,7 @@
 				CODE_SIGN_IDENTITY = "Apple Development";
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
 				CODE_SIGN_STYLE = Manual;
-				CURRENT_PROJECT_VERSION = 7;
+				CURRENT_PROJECT_VERSION = 9;
 				DEVELOPMENT_TEAM = "";
 				"DEVELOPMENT_TEAM[sdk=iphoneos*]" = 6SV76WTUUR;
 				FRAMEWORK_SEARCH_PATHS = (

+ 1 - 1
创维盒子/双子星云手机/AppDelegate/SceneDelegate.h

@@ -7,7 +7,7 @@
 
 #import <UIKit/UIKit.h>
 #import "PlayerViewController.h"
-
+#import "uploadFileRecordViewController.h"
 @interface SceneDelegate : UIResponder <UIWindowSceneDelegate>
 
 @property (strong, nonatomic) UIWindow *window;

+ 28 - 5
创维盒子/双子星云手机/AppDelegate/SceneDelegate.m

@@ -34,7 +34,7 @@
 #import <TencentOpenAPI/TencentOAuth.h>
 #import "NASMsgModel.h"
 #import "queryOneShareModel.h"
-
+#import "boxSaveFileManager.h"
 
 @interface SceneDelegate ()<SetUsePWDViewControllerDelegate,GuideViewControllerDelegate>
 @property(nonatomic, strong)   CalculatorViewController *calculatorVC;
@@ -52,6 +52,9 @@
 
 @property (nonatomic, assign)  BOOL isNeedToStopWork;// 无网络报错
 @property (nonatomic, assign)  BOOL isDidShowPwdType;// 是否显示密码界面了
+
+@property(nonatomic, copy)   NSString *getShareStr;//拿到分享的字符串
+
 @end
 
 @implementation SceneDelegate
@@ -272,6 +275,7 @@
     
     __block BOOL isPrivacyMode = [connectDeviceManager shareInstance].DeviceThirdIdMod.data.isPrivacyMode;
     
+    KWeakSelf
     if(!_isQRCodeType){
         
         if(isPrivacyMode)
@@ -287,6 +291,7 @@
                         [connectDeviceManager shareInstance].isFirstInputPwdDone = YES;
                         playerRootVC.isPwdVCShow = NO;
                         [playerRootVC setShowImgAndVoiceTypeFun:YES];
+                        [weakSelf shareAwakenAppBy:weakSelf.getShareStr];
                 });
             });
         }
@@ -437,6 +442,7 @@
         //openprivacyxapp://page?param1=value1&param2=value2
         NSString *curStr = context.URL.absoluteString;
         if([curStr rangeOfString:@"openprivacyxapp://page"].location != NSNotFound){
+            _getShareStr = curStr;
             [self shareAwakenAppBy:curStr];
             break;
         }
@@ -1041,6 +1047,7 @@
 
         queryOneShareModel*model = [[queryOneShareModel alloc] initWithDictionary:responseObject error:nil];
         if(model && model.status == 0){
+            weakSelf.getShareStr = nil;
             [weakSelf gotoVCByModel:model withType:type];
         }
         else{
@@ -1065,7 +1072,7 @@
 }
 
 #pragma mark 保存文件到盒子
-- (void)saveFileToBoxFunBy:(queryOneShareModel*)model
+- (void)saveFileToBoxFunBy:(queryOneShareModel*)sharemodel
 {
     NSMutableDictionary*paraDict = [NSMutableDictionary new];
     
@@ -1075,7 +1082,7 @@
     
     NSMutableArray *pathArr = [NSMutableArray new];
     
-    for (ShareFileDataModel*dataModel in model.data.fileListVOS){
+    for (ShareFileDataModel*dataModel in sharemodel.data.fileListVOS){
 //        if(dataStr.length != 0){
 //            [dataStr appendString:@","];
 //        }
@@ -1106,16 +1113,32 @@
     
     [paraDict setValue:boxSaveDefaultPath forKey:@"savePath"];
     
-    //KWeakSelf
+    KWeakSelf
     [[netWorkManager shareInstance] cloudPhoneGETCallBackCode:@"downFiles" Parameters:paraDict success:^(id  _Nonnull responseObject) {
         
         SuperModel *model = [[SuperModel alloc] initWithDictionary:responseObject error:nil];
         if(model && model.status == 0){
-            
+            [weakSelf gotoUploadFileRecordVCFunByType:2 withModel:sharemodel];
         }
     } failure:^(NSError * _Nonnull error) {
         
     }];
 }
 
+#pragma mark 跳转传输列表
+- (void)gotoUploadFileRecordVCFunByType:(NSInteger)type withModel:(queryOneShareModel*)sharemodel
+{
+    if(type == 2){
+        [[boxSaveFileManager shareInstance] addBoxSaveRecordFunBy:sharemodel.data.fileListVOS];
+    }
+    
+    uploadFileRecordViewController *vc = [uploadFileRecordViewController new];
+    vc.isReceiveType = type;
+    
+    if(_curPlayerVC){
+        [[UIApplication sharedApplication] setStatusBarHidden:NO];
+        [_curPlayerVC.navigationController pushViewController:vc animated:YES];
+    }
+}
+
 @end

+ 12 - 0
创维盒子/双子星云手机/Class/Set/previewFile/model/ShareRecordModel.h

@@ -6,9 +6,18 @@
 //
 
 #import "SuperModel.h"
+#import "BGFMDB.h" //添加该头文件,本类就具有了存储功能.
 
 NS_ASSUME_NONNULL_BEGIN
 
+typedef enum{
+    saveBoxStateBegin = 0,
+    saveBoxStateUploading,//占位 未用到
+    saveBoxStateSuspend,//占位 未用到
+    saveBoxStateDone,
+    saveBoxStateFail,
+}shareSaveBoxStateType;
+
 @interface ShareFileDataModel : SuperModel
 @property (nonatomic, copy) NSString*fileName;
 @property (nonatomic, copy) NSString*fileSize;
@@ -17,6 +26,9 @@ NS_ASSUME_NONNULL_BEGIN
 @property (nonatomic, copy) NSString*headUrl;
 //@property (nonatomic, assign) long  size;
 //id
+
+//自定义
+@property (nonatomic, assign) shareSaveBoxStateType saveboxStateType;
 @end
 
 @protocol ShareFileDataModel;

+ 1 - 1
创维盒子/双子星云手机/Class/Set/previewFile/model/queryOneShareModel.h

@@ -7,7 +7,7 @@
 
 #import "SuperModel.h"
 #import "ShareRecordModel.h"
-
+#import "BGFMDB.h" //添加该头文件,本类就具有了存储功能.
 
 NS_ASSUME_NONNULL_BEGIN
 

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

@@ -294,7 +294,7 @@
     {
        //uploadFile_TXT  uploadFile_pdf uploadFile_xlsx uploadFile_doc
         NSArray *nameArr= [curNASFileAndFolderDataModel.name componentsSeparatedByString:@"."];
-        if (nameArr.count > 2) {
+        if (nameArr.count >= 2) {
             NSString *lastName = nameArr.lastObject;
             
             lastName = [lastName lowercaseString];

+ 25 - 0
创维盒子/双子星云手机/Class/Set/uploadFile/receiveView/boxReceiveFileRecordCell.h

@@ -0,0 +1,25 @@
+//
+//  boxReceiveFileRecordCell.h
+//  双子星云手机
+//
+//  Created by xd h on 2024/5/24.
+//
+
+#import <UIKit/UIKit.h>
+#import "queryOneShareModel.h"
+NS_ASSUME_NONNULL_BEGIN
+
+@interface boxReceiveFileRecordCell : UITableViewCell
+
+@property(nonatomic,strong) ShareFileDataModel * curShareFileDataModel;
+@property (nonatomic,assign) BOOL isEditType;
+@property (nonatomic,assign) BOOL isSelectType;
+
+@property (nonatomic,copy) void (^didLongPressClick)(void);
+//点击按钮
+@property (nonatomic,copy) void (^didClckSelectBut)(BOOL isSelect);
+//手势点击
+@property (nonatomic,copy) void (^didTapPressClick)(void);
+@end
+
+NS_ASSUME_NONNULL_END

+ 322 - 0
创维盒子/双子星云手机/Class/Set/uploadFile/receiveView/boxReceiveFileRecordCell.m

@@ -0,0 +1,322 @@
+//
+//  boxReceiveFileRecordCell.m
+//  双子星云手机
+//
+//  Created by xd h on 2024/5/24.
+//
+
+#import "boxReceiveFileRecordCell.h"
+
+#import "cachesFileManager.h"
+#import <SDWebImage/SDWebImage.h>
+#import "downloadThumbnailManager.h"
+
+@interface boxReceiveFileRecordCell ()
+@property(nonatomic,strong) UIImageView *fileImageView;
+@property(nonatomic,strong) UIButton *upLoadStateButton;
+
+@property (nonatomic, strong) UIButton *selectButton;
+
+@property(nonatomic,strong) UILabel *fileNamelabel;
+@property(nonatomic,strong) UILabel *fileStatelabel;
+
+@end
+
+@implementation boxReceiveFileRecordCell
+
+- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
+{
+    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
+    
+    if (self)
+    {
+        [self drawView];
+    }
+    
+    return self;
+}
+
+- (void)drawView
+{
+    _fileImageView = [[UIImageView alloc] init];
+    //_fileImageView.backgroundColor = [UIColor greenColor];
+    [_fileImageView setContentMode:(UIViewContentModeScaleAspectFit)];
+    [self.contentView addSubview:_fileImageView];
+    
+    [_fileImageView mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(15);
+        make.width.mas_equalTo(36);
+        make.height.mas_equalTo(36);
+        make.bottom.mas_equalTo(-18);
+    }];
+    
+    _upLoadStateButton = [[UIButton alloc] init];
+    //_upLoadStateButton.backgroundColor = [UIColor redColor];
+    [self.contentView addSubview:_upLoadStateButton];
+    [_upLoadStateButton addTarget:self action:@selector(tapClick:) forControlEvents:UIControlEventTouchUpInside];
+    
+    [_upLoadStateButton mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.right.mas_equalTo(-5);
+        make.width.mas_equalTo(50);
+        make.height.mas_equalTo(50);
+        make.bottom.mas_equalTo(-18);
+    }];
+    
+    if (self.selectButton == nil) {
+        UIButton *but = [[UIButton alloc] init];
+        [but setImage:[UIImage imageNamed:@"upload_file_uncheck"] forState:UIControlStateNormal];
+        [but setImage:[UIImage imageNamed:@"upload_file_check"] forState:UIControlStateSelected];
+        [self.contentView addSubview:but];
+        [but addTarget:self action:@selector(didClickSelectButFun:) forControlEvents:UIControlEventTouchUpInside];
+        but.hidden = YES;
+        //but.backgroundColor = [UIColor greenColor];
+        //but.frame = CGRectMake([UIScreen mainScreen].bounds.size.width -10 - 25, 0, 25, 25);
+        [but mas_makeConstraints:^(MASConstraintMaker *make) {
+            make.width.mas_equalTo(30);
+            make.height.mas_equalTo(30);
+            make.centerX.mas_equalTo(_upLoadStateButton.mas_centerX);
+            make.centerY.mas_equalTo(_upLoadStateButton.mas_centerY);
+        }];
+        
+        self.selectButton = but;
+    }
+    
+
+    _fileNamelabel = [[UILabel alloc] init];
+    _fileNamelabel.font = [UIFont systemFontOfSize:14.0];
+    _fileNamelabel.textColor = [UIColor blackColor];
+    _fileNamelabel.numberOfLines = 0;
+    //_fileNamelabel.backgroundColor = [UIColor greenColor];
+    [self.contentView addSubview:_fileNamelabel];
+    
+    [_fileNamelabel mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(_fileImageView.mas_right).offset(10);
+        make.right.mas_equalTo(_upLoadStateButton.mas_left).offset(-10);
+        make.height.mas_equalTo(30);
+        make.bottom.equalTo(_fileImageView.mas_centerY).offset(0);
+    }];
+    
+    _fileStatelabel = [[UILabel alloc] init];
+    _fileStatelabel.font = [UIFont systemFontOfSize:12.0];
+    _fileStatelabel.textColor = [UIColor hwColor:@"#959799" alpha:1.0];
+    //_fileProgresslabel.backgroundColor = [UIColor greenColor];
+    [self.contentView addSubview:_fileStatelabel];
+    
+    [_fileStatelabel mas_makeConstraints:^(MASConstraintMaker *make) {
+        make.left.mas_equalTo(_fileImageView.mas_right).offset(10);
+        make.right.mas_equalTo(_upLoadStateButton.mas_left).offset(-10);
+        make.height.mas_equalTo(15);
+        make.top.mas_equalTo(_fileNamelabel.mas_bottom).offset(3);
+    }];
+    
+    
+    //长按手势
+    UILongPressGestureRecognizer *longPressGesture = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(longPressClick:)];
+    //用几个手指触屏,默认1
+    longPressGesture.numberOfTouchesRequired = 1;
+    //设置最短长按时间,单位为秒(默认0.5)
+    longPressGesture.minimumPressDuration = 1;
+    //设置手势识别期间所允许的手势可移动范围
+    longPressGesture.allowableMovement = 10;
+    [self.contentView addGestureRecognizer:longPressGesture];
+
+}
+
+- (void)setIsEditType:(BOOL)isEditType
+{
+    _isEditType = isEditType;
+    
+    if(isEditType){
+        self.selectButton.hidden = NO;
+        
+//        if(_curUploadFileDataModel.curUploadStateType == uploadStateWait
+//           ||_curUploadFileDataModel.curUploadStateType == uploadStateUploading
+//           ||_curUploadFileDataModel.curUploadStateType == uploadStateSuspend){
+            _upLoadStateButton.hidden = YES;
+        //}
+    }
+    else{
+        self.selectButton.hidden = YES;
+        
+//        if(_curCouldPhoneFileModel.curDownloadStateType == downloadStateWait
+//           ||_curCouldPhoneFileModel.curDownloadStateType == downloadStateUploading
+//           ||_curCouldPhoneFileModel.curDownloadStateType == downloadStateSuspend){
+//            _upLoadStateButton.hidden = NO;
+//        }
+    }
+}
+
+- (void)setIsSelectType:(BOOL)isSelectType
+{
+    _isSelectType = isSelectType;
+    
+    if(isSelectType){
+        self.selectButton.selected = YES;
+    }
+    else{
+        self.selectButton.selected = NO;
+    }
+}
+
+//@所有人 文件格式需要支持以下内容预览/播放
+//1. 图片格式:JPG、JPEG、PNG、GIF、BMP、SVG、TIFF、HEIC。
+//2. 音频格式:MP3、WAV、FLAC、AAC、OGG。
+//3. 视频格式:MP4、AVI、FLV、WMV、MKV、TS、MOV、RMVB。
+
+
+- (void)setCurShareFileDataModel:(ShareFileDataModel *)curShareFileDataModel
+{
+  
+    _upLoadStateButton.hidden = NO;
+    
+    _curShareFileDataModel = curShareFileDataModel;
+    
+   
+    NSArray *nameArr= [curShareFileDataModel.fileName componentsSeparatedByString:@"."];
+    
+    HLog(@"fileName: %@",curShareFileDataModel.fileName);
+    if (nameArr.count >= 2) {
+        NSString *lastName = nameArr.lastObject;
+        
+        lastName = [lastName lowercaseString];
+        HLog(@"lastName: %@",lastName);
+        if ([lastName rangeOfString:@"txt"].location != NSNotFound) {
+            _fileImageView.image = [UIImage imageNamed:@"uploadFile_TXT"];
+        }
+        else if ([lastName rangeOfString:@"pdf"].location != NSNotFound) {
+            _fileImageView.image = [UIImage imageNamed:@"uploadFile_pdf"];
+        }
+        else if ([lastName rangeOfString:@"xlsx"].location != NSNotFound) {
+            _fileImageView.image = [UIImage imageNamed:@"uploadFile_xlsx"];
+        }
+        else if ([lastName rangeOfString:@"doc"].location != NSNotFound
+                 ||[lastName rangeOfString:@"docx"].location != NSNotFound) {
+            _fileImageView.image = [UIImage imageNamed:@"uploadFile_doc"];
+        }
+        else if ([lastName rangeOfString:@"mp3"].location != NSNotFound
+                 ||[lastName rangeOfString:@"wav"].location != NSNotFound
+                 ||[lastName rangeOfString:@"flac"].location != NSNotFound
+                 ||[lastName rangeOfString:@"aac"].location != NSNotFound
+                 ||[lastName rangeOfString:@"ogg"].location != NSNotFound
+                 ) {
+            _fileImageView.image = [UIImage imageNamed:@"uploadFile_audio"];
+        }
+        else if ([lastName rangeOfString:@"jpg"].location != NSNotFound
+                 ||[lastName rangeOfString:@"jpeg"].location != NSNotFound
+                 ||[lastName rangeOfString:@"png"].location != NSNotFound
+                 ||[lastName rangeOfString:@"gif"].location != NSNotFound
+                 ||[lastName rangeOfString:@"bmp"].location != NSNotFound
+                 ||[lastName rangeOfString:@"svg"].location != NSNotFound
+                 ||[lastName rangeOfString:@"tiff"].location != NSNotFound
+                 ||[lastName rangeOfString:@"heic"].location != NSNotFound
+                 ) {//JPG、JPEG、PNG、GIF、BMP、SVG、TIFF、HEIC。
+            //MP4、AVI、FLV、WMV、MKV、TS、MOV、RMVB。
+            
+            NSString *fileUrl = curShareFileDataModel.headUrl;
+            fileUrl = [fileUrl  stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
+            UIImage * defaultImage = [UIImage imageNamed:@"uploadFile_image"];
+            [_fileImageView sd_setImageWithURL:[NSURL URLWithString:fileUrl] placeholderImage:defaultImage completed:^(UIImage * _Nullable image, NSError * _Nullable error, SDImageCacheType cacheType, NSURL * _Nullable imageURL) {
+                if(image){
+                    //HLog(@"11图片1:%@",imageURL.absoluteString);
+                }
+                else{
+                    //HLog(@"11图片0:%@",imageURL.absoluteString);
+                }
+                
+            }];
+        }
+        else if ([lastName rangeOfString:@"mp4"].location != NSNotFound
+                 ||[lastName rangeOfString:@"avi"].location != NSNotFound
+                 ||[lastName rangeOfString:@"flv"].location != NSNotFound
+                 ||[lastName rangeOfString:@"wmv"].location != NSNotFound
+                 ||[lastName rangeOfString:@"wkm"].location != NSNotFound
+                 ||[lastName rangeOfString:@"ts"].location != NSNotFound
+                 ||[lastName rangeOfString:@"mov"].location != NSNotFound
+                 ||[lastName rangeOfString:@"rmvb"].location != NSNotFound
+                 ) {//JPG、JPEG、PNG、GIF、BMP、SVG、TIFF、HEIC。
+            //MP4、AVI、FLV、WMV、MKV、TS、MOV、RMVB。
+            
+            NSString *fileUrl = curShareFileDataModel.headUrl;
+            fileUrl = [fileUrl  stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
+            UIImage * defaultImage = [UIImage imageNamed:@"uploadFile_Video"];
+            [_fileImageView sd_setImageWithURL:[NSURL URLWithString:fileUrl] placeholderImage:defaultImage completed:^(UIImage * _Nullable image, NSError * _Nullable error, SDImageCacheType cacheType, NSURL * _Nullable imageURL) {
+                if(image){
+                    //HLog(@"11图片1:%@",imageURL.absoluteString);
+                }
+                else{
+                    //HLog(@"11图片0:%@",imageURL.absoluteString);
+                }
+                
+            }];
+        }
+        else{
+            _fileImageView.image = [UIImage imageNamed:@"uploadFile_other"];
+        }
+    }
+    
+    
+    _fileNamelabel.text = curShareFileDataModel.fileName;
+    
+    _fileStatelabel.textColor = [UIColor hwColor:@"#959799" alpha:1.0];
+    if(curShareFileDataModel.saveboxStateType == saveBoxStateBegin){
+        _fileStatelabel.text = NSLocalizedString(@"box_receive_file_ing",nil);
+    }
+    else if(curShareFileDataModel.saveboxStateType == saveBoxStateDone){
+        _fileStatelabel.text = NSLocalizedString(@"box_receive_file_suc",nil);
+    }
+    else if(curShareFileDataModel.saveboxStateType == saveBoxStateFail){
+        _fileStatelabel.text = NSLocalizedString(@"box_receive_file_fail",nil);
+        _fileStatelabel.textColor = [UIColor hwColor:@"#DD4E4E" alpha:1.0];
+    }
+    
+    
+}
+
+
+-(void)longPressClick:(UILongPressGestureRecognizer *)press{
+    //state属性是所有手势父类提供的方法,用于记录手势的状态
+    if(press.state == UIGestureRecognizerStateBegan){
+        //NSLog(@"长按手势开始响应!");
+        
+        if(_didLongPressClick){
+            _didLongPressClick();
+        }
+        
+    }else if (press.state == UIGestureRecognizerStateChanged){
+        //NSLog(@"长按手势状态发生改变!");
+    }else{
+        //NSLog(@"长按手势结束!");
+    }
+
+}
+
+- (void)didClickSelectButFun:(UIButton*)but
+{
+    but.selected = !but.selected;
+    if(_didClckSelectBut){
+        _didClckSelectBut(but.selected);
+    }
+}
+
+- (void)tapClick:(UIButton*)but{
+    if(_didTapPressClick){
+        _didTapPressClick();
+    }
+    
+//    if(_curCouldPhoneFileModel.curDownloadStateType == downloadStateUploading){
+//        [_upLoadStateButton setImage:[UIImage imageNamed:@"uploadFile_start"] forState:UIControlStateNormal];
+//        
+//    }
+//    else if(_curCouldPhoneFileModel.curDownloadStateType == downloadStateSuspend){
+//       
+//        [_upLoadStateButton setImage:[UIImage imageNamed:@"uploadFile_suspend"] forState:UIControlStateNormal];
+//    }
+    
+    
+    but.userInteractionEnabled = NO;
+    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+        but.userInteractionEnabled = YES;
+    });
+}
+
+@end

+ 6 - 5
创维盒子/双子星云手机/Class/Set/uploadFile/receiveView/receiveSaveRecordTableView.h

@@ -8,16 +8,17 @@
 #import <UIKit/UIKit.h>
 #import "uploadFileRecordTableViewHeadView.h"
 #import "couldPhoneFileListModel.h"
+#import "queryOneShareModel.h"
 
 NS_ASSUME_NONNULL_BEGIN
 
 @interface receiveSaveRecordTableView : UITableView
 @property (nonatomic, strong) NSMutableArray *outSideDataArr;
-@property (nonatomic, strong)NSMutableArray *downloadingArr;
-@property (nonatomic, strong)NSMutableArray *downloadfailArr;
-@property (nonatomic, strong)NSMutableArray *downloadDoneArr;
+@property (nonatomic, strong)NSMutableArray *boxSaveingArr;
+@property (nonatomic, strong)NSMutableArray *boxSavefailArr;
+@property (nonatomic, strong)NSMutableArray *boxSaveDoneArr;
 
-@property (nonatomic,strong) uploadFileRecordTableViewHeadView *downloadingHeadView;
+@property (nonatomic,strong) uploadFileRecordTableViewHeadView *boxSaveingHeadView;
 @property (nonatomic,strong) uploadFileRecordTableViewHeadView *failHeadView;
 @property (nonatomic,strong) uploadFileRecordTableViewHeadView *doneHeadView;
 
@@ -26,7 +27,7 @@ NS_ASSUME_NONNULL_BEGIN
 @property (nonatomic,strong) NSMutableArray *selectModelArr;
 
 @property (nonatomic,copy) void (^didLongPressClick)(void);
-@property (nonatomic,copy) void (^didClickReUploadBlock)(couldPhoneFileModel* model);
+@property (nonatomic,copy) void (^didClickReUploadBlock)(ShareFileDataModel* model);
 
 @property (nonatomic,copy) void (^didClickSectionHeadViewRightButton)(NSInteger section);
 @property (nonatomic,copy) void (^didNeedRefreshGetDatabaseFun)(void);

+ 154 - 147
创维盒子/双子星云手机/Class/Set/uploadFile/receiveView/receiveSaveRecordTableView.m

@@ -6,7 +6,7 @@
 //
 
 #import "receiveSaveRecordTableView.h"
-#import "downloadFileRecordCell.h"
+#import "boxReceiveFileRecordCell.h"
 #import "UIScrollView+EmptyDataSet.h"
 #import "uploadFileRecordTableViewHeadView.h"
 
@@ -59,9 +59,13 @@
     
     _outSideDataArr = outSideDataArr;
     
-    _downloadingArr = outSideDataArr[0];
-    _downloadDoneArr = outSideDataArr[1];
-    _downloadfailArr = outSideDataArr[2];
+    _boxSaveingArr = outSideDataArr[0];
+    _boxSaveDoneArr = outSideDataArr[1];
+    _boxSavefailArr = outSideDataArr[2];
+    
+    //test code
+    _boxSaveDoneArr = outSideDataArr[0];
+    _boxSavefailArr = outSideDataArr[0];
     
     [self RefreshAllDataFun];
 }
@@ -70,16 +74,16 @@
 {
     NSMutableArray *totalArr = [NSMutableArray new];
     
-    if(_downloadingArr.count>0){
-        [totalArr addObject:_downloadingArr];
+    if(_boxSaveingArr.count>0){
+        [totalArr addObject:_boxSaveingArr];
     }
     
-    if(_downloadfailArr.count>0){
-        [totalArr addObject:_downloadfailArr];
+    if(_boxSavefailArr.count>0){
+        [totalArr addObject:_boxSavefailArr];
     }
     
-    if(_downloadDoneArr.count>0){
-        [totalArr addObject:_downloadDoneArr];
+    if(_boxSaveDoneArr.count>0){
+        [totalArr addObject:_boxSaveDoneArr];
     }
     
     _curDataArr = totalArr;
@@ -107,12 +111,12 @@
     
     NSInteger row = indexPath.row;
     NSInteger section = indexPath.section;
-    static NSString *identifier = @"downloadFileRecordCell";
+    static NSString *identifier = @"boxReceiveFileRecordCell";
     
-    downloadFileRecordCell * cell =  [tableView dequeueReusableCellWithIdentifier:identifier];
+    boxReceiveFileRecordCell * cell =  [tableView dequeueReusableCellWithIdentifier:identifier];
     cell.selectionStyle = UITableViewCellSelectionStyleNone;
     if (!cell){
-        cell = [[downloadFileRecordCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:identifier];
+        cell = [[boxReceiveFileRecordCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:identifier];
         [cell setSelectionStyle:UITableViewCellSelectionStyleNone];
         [cell setBackgroundColor:[UIColor clearColor]];
         [cell setAccessoryType:(UITableViewCellAccessoryNone)];
@@ -122,8 +126,8 @@
         NSMutableArray *curArr = _curDataArr[section];
         
         if(row < curArr.count){
-            couldPhoneFileModel *model = curArr[row];
-            cell.curCouldPhoneFileModel = model;
+            ShareFileDataModel *model = curArr[row];
+            cell.curShareFileDataModel = model;
             cell.isEditType = _isEditType;
 
             if(_isEditType){
@@ -137,25 +141,25 @@
             
             KWeakSelf
             cell.didLongPressClick = ^{
-                [weakSelf didLongPressClickFun];
+                //[weakSelf didLongPressClickFun];
             };
 
             cell.didClckSelectBut = ^(BOOL isSelect) {
-                [weakSelf selectModelOneByOne:model BySelect:isSelect];
+               // [weakSelf selectModelOneByOne:model BySelect:isSelect];
             };
 
             cell.didTapPressClick = ^{
-                if(model.curDownloadStateType == downloadStateUploading){
-                    model.curDownloadStateType = downloadStateSuspend;
-                    [weakSelf handleDownloadingStateTapFunBy:YES with:model];
-                }
-                else if(model.curDownloadStateType == downloadStateSuspend){
-                    model.curDownloadStateType = downloadStateUploading;
-                    [weakSelf handleDownloadingStateTapFunBy:NO with:model];
-                }
-                else if(model.curDownloadStateType == downloadStateFail){
-                    [weakSelf handleUploadFailStateWith:model];
-                }
+//                if(model.curDownloadStateType == downloadStateUploading){
+//                    model.curDownloadStateType = downloadStateSuspend;
+//                    [weakSelf handleDownloadingStateTapFunBy:YES with:model];
+//                }
+//                else if(model.curDownloadStateType == downloadStateSuspend){
+//                    model.curDownloadStateType = downloadStateUploading;
+//                    [weakSelf handleDownloadingStateTapFunBy:NO with:model];
+//                }
+//                else if(model.curDownloadStateType == downloadStateFail){
+//                    [weakSelf handleUploadFailStateWith:model];
+//                }
             };
         }
     }
@@ -174,10 +178,10 @@
         curType = 2;
     }
     else if(section == 1){
-        if(_downloadingArr.count == 0){
+        if(_boxSaveingArr.count == 0){
             curType = 2;
         }
-        else if(_downloadfailArr.count == 0){
+        else if(_boxSavefailArr.count == 0){
             curType = 2;
         }
         else{
@@ -185,10 +189,10 @@
         }
     }
     else{
-        if(_downloadingArr.count > 0){
+        if(_boxSaveingArr.count > 0){
             curType = 0;
         }
-        else if(_downloadfailArr.count > 0){
+        else if(_boxSavefailArr.count > 0){
             curType = 1;
         }
         else{
@@ -199,16 +203,15 @@
     
     [self RefresHeadUIFun];
     
-    return [UIView new];
-//    if(curType == 2){
-//        return _doneHeadView;
-//    }
-//    else if(curType == 1){
-//        return _failHeadView;
-//    }
-//    else{
-//        return _downloadingHeadView;
-//    }
+    if(curType == 2){
+        return _doneHeadView;
+    }
+    else if(curType == 1){
+        return _failHeadView;
+    }
+    else{
+        return _boxSaveingHeadView;
+    }
     
 }
 
@@ -268,58 +271,62 @@
 - (void)initTableHeaderInSectionFun
 {
     KWeakSelf
-//    if(!_downloadingHeadView){
-//        _downloadingHeadView = [[uploadFileRecordTableViewHeadView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_W, 40)];
-//        //headView.backgroundColor = [UIColor greenColor];
-//
-//        NSString *leftStr =  NSLocalizedString(@"File_upload_Record_downloading",nil);
-//        NSString *rightStr =  NSLocalizedString(@"File_upload_Record_all_suspend",nil);
-//        NSString *rightSelectStr =  NSLocalizedString(@"File_upload_Record_all_open",nil);
-//        NSString *titleStr = [[NSString alloc] initWithFormat:@"%@ (%ld)",leftStr,_downloadingArr.count];
-//
-//        _downloadingHeadView.titleLabel.text = titleStr;
-//        [_downloadingHeadView.rightButton setTitle:rightStr forState:UIControlStateNormal];
-//        [_downloadingHeadView.rightButton setTitle:rightSelectStr forState:UIControlStateSelected];
-//
-//        _downloadingHeadView.didClickButFun = ^{
-//            [weakSelf didClickRightButtonFun:0];
-//        };
-//    }
-//
-//
-//    if(!_failHeadView){
-//        _failHeadView = [[uploadFileRecordTableViewHeadView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_W, 40)];
-//        //headView.backgroundColor = [UIColor greenColor];
-//
-//        NSString *leftStr =  NSLocalizedString(@"File_upload_Record_download_fail",nil);
-//        NSString *rightStr =  NSLocalizedString(@"File_upload_Record_clear_Record",nil);
-//        NSString *titleStr = [[NSString alloc] initWithFormat:@"%@ (%ld)",leftStr,_downloadfailArr.count];
-//
-//         _failHeadView.titleLabel.text = titleStr;
-//        [_failHeadView.rightButton setTitle:rightStr forState:UIControlStateNormal];
-//
-//        _failHeadView.didClickButFun = ^{
-//            [weakSelf didClickRightButtonFun:2];
-//        };
-//    }
-//
-//    if(!_doneHeadView){
-//        _doneHeadView = [[uploadFileRecordTableViewHeadView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_W, 40)];
-//        //headView.backgroundColor = [UIColor greenColor];
-//
-//        NSString *leftStr =  NSLocalizedString(@"File_upload_Record_did_download",nil);
-//        NSString *rightStr =  NSLocalizedString(@"File_upload_Record_clear_Record",nil);
-//        NSString *titleStr = [[NSString alloc] initWithFormat:@"%@ (%ld)",leftStr,_downloadDoneArr.count];
-//
-//        _doneHeadView.titleLabel.text = titleStr;
-//        [_doneHeadView.rightButton setTitle:rightStr forState:UIControlStateNormal];
-//
-//        _doneHeadView.didClickButFun = ^{
-//            [weakSelf didClickRightButtonFun:1];
-//        };
-//    }
-//
-//
+    if(!_boxSaveingHeadView){
+        _boxSaveingHeadView = [[uploadFileRecordTableViewHeadView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_W, 40)];
+        //headView.backgroundColor = [UIColor greenColor];
+
+        NSString *leftStr =  NSLocalizedString(@"box_receive_Record_receiveing",nil);
+        NSString *rightStr =  NSLocalizedString(@"File_upload_Record_all_suspend",nil);
+        NSString *rightSelectStr =  NSLocalizedString(@"File_upload_Record_all_open",nil);
+        NSString *titleStr = [[NSString alloc] initWithFormat:@"%@ (%ld)",leftStr,_boxSaveingArr.count];
+
+        _boxSaveingHeadView.titleLabel.text = titleStr;
+//        [_boxSaveingHeadView.rightButton setTitle:rightStr forState:UIControlStateNormal];
+//        [_boxSaveingHeadView.rightButton setTitle:rightSelectStr forState:UIControlStateSelected];
+
+        _boxSaveingHeadView.rightButton.hidden = YES;
+        
+        _boxSaveingHeadView.didClickButFun = ^{
+            [weakSelf didClickRightButtonFun:0];
+        };
+    }
+
+
+    if(!_failHeadView){
+        _failHeadView = [[uploadFileRecordTableViewHeadView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_W, 40)];
+        //headView.backgroundColor = [UIColor greenColor];
+
+        NSString *leftStr =  NSLocalizedString(@"box_receive_Record_fail",nil);
+        //NSString *rightStr =  NSLocalizedString(@"File_upload_Record_clear_Record",nil);
+        NSString *titleStr = [[NSString alloc] initWithFormat:@"%@ (%ld)",leftStr,_boxSavefailArr.count];
+
+         _failHeadView.titleLabel.text = titleStr;
+        //[_failHeadView.rightButton setTitle:rightStr forState:UIControlStateNormal];
+        _failHeadView.rightButton.hidden = YES;
+        
+        _failHeadView.didClickButFun = ^{
+            [weakSelf didClickRightButtonFun:2];
+        };
+    }
+
+    if(!_doneHeadView){
+        _doneHeadView = [[uploadFileRecordTableViewHeadView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_W, 40)];
+        //headView.backgroundColor = [UIColor greenColor];
+
+        NSString *leftStr =  NSLocalizedString(@"box_receive_Record_suc",nil);
+        //NSString *rightStr =  NSLocalizedString(@"File_upload_Record_clear_Record",nil);
+        NSString *titleStr = [[NSString alloc] initWithFormat:@"%@ (%ld)",leftStr,_boxSaveDoneArr.count];
+
+        _doneHeadView.titleLabel.text = titleStr;
+        //[_doneHeadView.rightButton setTitle:rightStr forState:UIControlStateNormal];
+        _doneHeadView.rightButton.hidden = YES;
+        
+        _doneHeadView.didClickButFun = ^{
+            [weakSelf didClickRightButtonFun:1];
+        };
+    }
+
+
 }
 
 #pragma mark 点击头部右边按钮
@@ -334,56 +341,56 @@
 -(void)RefresHeadUIFun
 {
 
-//    if(_downloadingHeadView){
-//        NSString *leftStr =  NSLocalizedString(@"File_upload_Record_downloading",nil);
-//        NSString *rightStr =  NSLocalizedString(@"File_upload_Record_all_suspend",nil);
-//        NSString *rightSelectStr =  NSLocalizedString(@"File_upload_Record_all_open",nil);
-//        NSString *titleStr = [[NSString alloc] initWithFormat:@"%@ (%ld)",leftStr,_downloadingArr.count];
-//
-//        _downloadingHeadView.titleLabel.text = titleStr;
-//        [_downloadingHeadView.rightButton setTitle:rightStr forState:UIControlStateNormal];
-//        [_downloadingHeadView.rightButton setTitle:rightSelectStr forState:UIControlStateSelected];
-//
-//        if(_downloadingArr.count == 0){
-//            _downloadingHeadView.hidden = YES;
-//        }
-//        else{
-//            _downloadingHeadView.hidden = NO;
-//        }
-//    }
-//
-//
-//     if(_failHeadView){
-//        NSString *leftStr =  NSLocalizedString(@"File_upload_Record_download_fail",nil);
-//        NSString *rightStr =  NSLocalizedString(@"File_upload_Record_clear_Record",nil);
-//        NSString *titleStr = [[NSString alloc] initWithFormat:@"%@ (%ld)",leftStr,_downloadfailArr.count];
-//
-//         _failHeadView.titleLabel.text = titleStr;
-//        [_failHeadView.rightButton setTitle:rightStr forState:UIControlStateNormal];
-//
-//         if(_downloadfailArr.count == 0){
-//             _failHeadView.hidden = YES;
-//         }
-//         else{
-//             _failHeadView.hidden = NO;
-//         }
-//    }
-//
-//    if(_doneHeadView){
-//        NSString *leftStr =  NSLocalizedString(@"File_upload_Record_did_download",nil);
-//        NSString *rightStr =  NSLocalizedString(@"File_upload_Record_clear_Record",nil);
-//        NSString *titleStr = [[NSString alloc] initWithFormat:@"%@ (%ld)",leftStr,_downloadDoneArr.count];
-//
-//        _doneHeadView.titleLabel.text = titleStr;
-//        [_doneHeadView.rightButton setTitle:rightStr forState:UIControlStateNormal];
-//
-//        if(_downloadDoneArr.count == 0){
-//            _doneHeadView.hidden = YES;
-//        }
-//        else{
-//            _doneHeadView.hidden = NO;
-//        }
-//    }
+    if(_boxSaveingHeadView){
+        NSString *leftStr =  NSLocalizedString(@"File_upload_Record_downloading",nil);
+        NSString *rightStr =  NSLocalizedString(@"File_upload_Record_all_suspend",nil);
+        NSString *rightSelectStr =  NSLocalizedString(@"File_upload_Record_all_open",nil);
+        NSString *titleStr = [[NSString alloc] initWithFormat:@"%@ (%ld)",leftStr,_boxSaveingArr.count];
+
+        _boxSaveingHeadView.titleLabel.text = titleStr;
+        [_boxSaveingHeadView.rightButton setTitle:rightStr forState:UIControlStateNormal];
+        [_boxSaveingHeadView.rightButton setTitle:rightSelectStr forState:UIControlStateSelected];
+
+        if(_boxSavefailArr.count == 0){
+            _boxSaveingHeadView.hidden = YES;
+        }
+        else{
+            _boxSaveingHeadView.hidden = NO;
+        }
+    }
+
+
+     if(_failHeadView){
+        NSString *leftStr =  NSLocalizedString(@"File_upload_Record_download_fail",nil);
+        NSString *rightStr =  NSLocalizedString(@"File_upload_Record_clear_Record",nil);
+        NSString *titleStr = [[NSString alloc] initWithFormat:@"%@ (%ld)",leftStr,_boxSavefailArr.count];
+
+         _failHeadView.titleLabel.text = titleStr;
+        [_failHeadView.rightButton setTitle:rightStr forState:UIControlStateNormal];
+
+         if(_boxSavefailArr.count == 0){
+             _failHeadView.hidden = YES;
+         }
+         else{
+             _failHeadView.hidden = NO;
+         }
+    }
+
+    if(_doneHeadView){
+        NSString *leftStr =  NSLocalizedString(@"File_upload_Record_did_download",nil);
+        NSString *rightStr =  NSLocalizedString(@"File_upload_Record_clear_Record",nil);
+        NSString *titleStr = [[NSString alloc] initWithFormat:@"%@ (%ld)",leftStr,_boxSaveDoneArr.count];
+
+        _doneHeadView.titleLabel.text = titleStr;
+        [_doneHeadView.rightButton setTitle:rightStr forState:UIControlStateNormal];
+
+        if(_boxSaveDoneArr.count == 0){
+            _doneHeadView.hidden = YES;
+        }
+        else{
+            _doneHeadView.hidden = NO;
+        }
+    }
 }
 
 #pragma mark  点击全选
@@ -393,9 +400,9 @@
     
     _selectModelArr = [NSMutableArray new];
     
-    [_selectModelArr addObjectsFromArray:_downloadingArr];
-    [_selectModelArr addObjectsFromArray:_downloadfailArr];
-    [_selectModelArr addObjectsFromArray:_downloadDoneArr];
+    [_selectModelArr addObjectsFromArray:_boxSaveingArr];
+    [_selectModelArr addObjectsFromArray:_boxSavefailArr];
+    [_selectModelArr addObjectsFromArray:_boxSaveDoneArr];
     
     [self reloadDataFun];
 }

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

@@ -11,6 +11,7 @@ NS_ASSUME_NONNULL_BEGIN
 
 @interface receiveView : UIView
 
+- (void)getAllDataFun;
 @end
 
 NS_ASSUME_NONNULL_END

+ 21 - 0
创维盒子/双子星云手机/Class/Set/uploadFile/receiveView/receiveView.m

@@ -9,6 +9,8 @@
 #import "receiveHeadView.h"
 #import "receiveDownloadRecordTableView.h"
 #import "receiveSaveRecordTableView.h"
+#import "boxSaveFileManager.h"
+
 @interface receiveView ()
 {
     
@@ -82,4 +84,23 @@
     }
 }
 
+#pragma mark 获取本地数据库数据
+- (void)getAllDataFun{
+    
+    [self getBoxSaveDataFun];
+}
+
+#pragma mark 读取保存到盒子的数据库
+- (void)getBoxSaveDataFun
+{
+    KWeakSelf
+    [[boxSaveFileManager shareInstance] getDataInDatabaseFun:NO complete:^(NSMutableArray * _Nonnull Arr) {
+        [weakSelf AferGetBoxSaveDataBy:Arr];
+    }];
+}
+
+- (void)AferGetBoxSaveDataBy:(NSMutableArray*)arr
+{
+    _saveRecordTableView.outSideDataArr = arr;
+}
 @end

+ 27 - 0
创维盒子/双子星云手机/Class/Set/uploadFile/uploadFileManager/boxSaveFileManager.h

@@ -0,0 +1,27 @@
+//
+//  boxSaveFileManager.h
+//  双子星云手机
+//
+//  Created by xd h on 2024/5/23.
+//
+
+#import <Foundation/Foundation.h>
+#import "queryOneShareModel.h"
+#import "uploadFileManager.h"
+NS_ASSUME_NONNULL_BEGIN
+
+#define share_box_save_tableName [[NSString alloc] initWithFormat:@"share_box_save_tableName_%@",[connectDeviceManager shareInstance].DeviceThirdIdMod.data.sn]
+
+@interface boxSaveFileManager : NSObject
++(boxSaveFileManager *)shareInstance;
+
+//数据库数据
+@property (nonatomic, strong) NSMutableArray * _Nullable databaseArr;
+
+//添加保存记录 NSArray<ShareFileDataModel>* fileListVOS;
+- (void)addBoxSaveRecordFunBy:(NSArray*)arr;
+#pragma mark 读取数据库数据
+- (void)getDataInDatabaseFun:(BOOL)isReGet complete:(custom_complete_Arr)complete;
+@end
+
+NS_ASSUME_NONNULL_END

+ 102 - 0
创维盒子/双子星云手机/Class/Set/uploadFile/uploadFileManager/boxSaveFileManager.m

@@ -0,0 +1,102 @@
+//
+//  boxSaveFileManager.m
+//  双子星云手机
+//
+//  Created by xd h on 2024/5/23.
+//
+
+#import "boxSaveFileManager.h"
+
+@implementation boxSaveFileManager
+static boxSaveFileManager * cur_boxSaveFileShareInstance = nil;
++(boxSaveFileManager *)shareInstance;
+{
+    static dispatch_once_t onceToken;
+    
+    dispatch_once(&onceToken, ^{
+        cur_boxSaveFileShareInstance = [[boxSaveFileManager alloc] init];
+        
+    });
+    
+    return cur_boxSaveFileShareInstance;
+}
+
+- (id)init
+{
+    self = [super init];
+    
+    if (self) {
+        //[self initManager];
+    }
+    
+    return self;
+}
+
+//添加保存记录
+- (void)addBoxSaveRecordFunBy:(NSArray*)arr{
+    if(arr && arr.count >0 ){
+        
+        for (ShareFileDataModel*model in arr) {
+            model.bg_tableName = share_box_save_tableName;
+        }
+        
+        //[ShareFileDataModel bg_saveOrUpdateArray:arr];
+        [ShareFileDataModel bg_saveOrUpdateArrayAsync:arr complete:^(BOOL isSuccess) {
+                    
+        }];
+    }
+}
+
+#pragma mark 读取数据库数据
+- (void)getDataInDatabaseFun:(BOOL)isReGet complete:(custom_complete_Arr)complete
+{
+    if(_databaseArr && _databaseArr.count == 3 && !isReGet){
+        complete(_databaseArr);
+        return;
+    }
+    
+    if(!_databaseArr)
+    {
+        _databaseArr = [NSMutableArray new];
+    }
+    
+    //KWeakSelf
+    //dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT,0), ^{
+//    NSLock *lock = [NSLock new];
+//    [lock lock];
+        [ShareFileDataModel bg_findAsync:share_box_save_tableName limit:0 orderBy:nil desc:YES complete:^(NSArray * _Nullable array) {
+            NSMutableArray *failArr = [NSMutableArray new];
+            NSMutableArray *doneArr = [NSMutableArray new];
+            NSMutableArray *otherArr = [NSMutableArray new];
+            if(array && array.count >0){
+                for (ShareFileDataModel * curModel in array) {
+                    
+                    if(curModel.saveboxStateType == saveBoxStateFail){
+                        [failArr addObject:curModel];
+                    }
+                    else if(curModel.saveboxStateType == saveBoxStateDone){
+                        [doneArr addObject:curModel];
+                    }
+                    else{
+                        [otherArr addObject:curModel];
+                    }
+                }
+            }
+            NSLock *lock = [NSLock new];
+            [lock lock];
+            
+            NSMutableArray *newArr = [NSMutableArray new];
+            [newArr addObject:otherArr];
+            [newArr addObject:doneArr];
+            [newArr addObject:failArr];
+            self->_databaseArr = newArr;
+            
+            [lock unlock];
+            
+            complete(self->_databaseArr);
+        }];
+   // [lock unlock];
+    //});
+
+}
+@end

+ 2 - 0
创维盒子/双子星云手机/Class/Set/uploadFile/uploadFileRecordViewController.h

@@ -18,6 +18,8 @@ NS_ASSUME_NONNULL_BEGIN
 
 @property (nonatomic, assign) BOOL isDownloadingType;//下载页面进入
 -(void)gotoDownloadFile:(NSMutableArray*)selectedItems;
+
+@property (nonatomic, assign) NSInteger isReceiveType;//h5分享页面进入
 @end
 
 NS_ASSUME_NONNULL_END

+ 22 - 9
创维盒子/双子星云手机/Class/Set/uploadFile/uploadFileRecordViewController.m

@@ -103,13 +103,14 @@
         [self getDownloadDataInDatabaseFun:YES];
     }
     else{
-        KWeakSelf
-        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
-            [weakSelf delayChangeUIFun];
-        });
+        [self delayChangeUIFunWithIndex:2];
     }
     
     [self getBackupsDatabaseFun];
+    
+    if(!_isReceiveType){
+        [_curReceiveView getAllDataFun];
+    }
 }
 
 - (void)handleRemoveIndicator
@@ -124,11 +125,16 @@
    
 }
 
-- (void)delayChangeUIFun
+//下载 2 接收 4
+- (void)delayChangeUIFunWithIndex:(NSInteger)index
 {
-    _selectIndex = 2;
-    [self didClickHeadFun:_selectIndex];
-    [self didScorllBodyFun:_selectIndex];
+    _selectIndex = index;
+    KWeakSelf
+    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+        [weakSelf didClickHeadFun:self->_selectIndex];
+        [weakSelf didScorllBodyFun:self->_selectIndex];
+    });
+   
 }
 
 #pragma mark UI
@@ -1065,5 +1071,12 @@
     [[downloadManager shareInstance] deleteDownloadFileRecordBy:_midTableView.downloadfailArr withDelCache:YES];
 }
 
-
+/**********************************接收相关******************************************/
+- (void)setIsReceiveType:(NSInteger)isReceiveType
+{
+    _isReceiveType = isReceiveType;
+    [self delayChangeUIFunWithIndex:4];
+    
+    [_curReceiveView getAllDataFun];
+}
 @end

BIN
创维盒子/双子星云手机/CloudPlayer/RCCloudPhoneSDK.framework/RCCloudPhoneSDK


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

@@ -511,3 +511,9 @@
 "File_save_to_box_check_title"   = "选择接收路径设置";
 "my_set_no_File_receive_title"   = "接收";
 "receive_save_title"   = "保存";
+"box_receive_Record_receiveing"   = "正在保存";
+"box_receive_Record_suc"   = "保存成功";
+"box_receive_Record_fail"   = "保存失败";
+"box_receive_file_ing"   = "保存资源中…";
+"box_receive_file_suc"   = "保存成功";
+"box_receive_file_fail"   = "保存失败";