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

1.数据库添加文件保存路径

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

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

@@ -29,6 +29,7 @@ typedef enum{
 
 //自定义
 @property (nonatomic, assign) shareSaveBoxStateType saveboxStateType;
+@property (nonatomic, copy) NSString*boxSavePath;//保存路口
 @end
 
 @protocol ShareFileDataModel;

+ 3 - 16
创维盒子/双子星云手机/Class/Set/uploadFile/receiveView/receiveDownloadRecordTableView.m

@@ -225,27 +225,13 @@
 #pragma mark 空数据
 - (UIImage *)imageForEmptyDataSet:(UIScrollView *)scrollView {
     
-    NSString *imageName = @"uploadFile_noData";
-    
-    if(self.tag == 101){
-        imageName = @"uploadFile_noData";
-    }
-    else if(self.tag == 102){
-        imageName = @"uploadFile_noData";
-    }
+    NSString *imageName = @"common_no_data_pic";
     
     return [UIImage imageNamed:imageName];
 }
 
 - (NSAttributedString *)titleForEmptyDataSet:(UIScrollView *)scrollView {
-    NSString *text = NSLocalizedString(@"File_upload_Record_no_data",nil);
-    
-    if(self.tag == 101){
-        text = NSLocalizedString(@"File_download_Record_no_data",nil);
-    }
-    else if(self.tag == 102){
-        text = NSLocalizedString(@"File_backups_Record_no_data",nil);
-    }
+    NSString *text = NSLocalizedString(@"common_no_data_tip",nil);
     
     NSDictionary *attributes = @{NSFontAttributeName: [UIFont systemFontOfSize:16.0f],
                                  NSForegroundColorAttributeName: HW999999Color};
@@ -253,6 +239,7 @@
     return [[NSAttributedString alloc] initWithString:text attributes:attributes];
 }
 
+
 //调整图片位置
 - (CGFloat)verticalOffsetForEmptyDataSet:(UIScrollView *)scrollView {
     return -150;

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

@@ -64,8 +64,8 @@
     _boxSavefailArr = outSideDataArr[2];
     
     //test code
-    _boxSaveDoneArr = outSideDataArr[0];
-    _boxSavefailArr = outSideDataArr[0];
+//    _boxSaveDoneArr = outSideDataArr[0];
+//    _boxSavefailArr = outSideDataArr[0];
     
     [self RefreshAllDataFun];
 }
@@ -227,27 +227,13 @@
 #pragma mark 空数据
 - (UIImage *)imageForEmptyDataSet:(UIScrollView *)scrollView {
     
-    NSString *imageName = @"uploadFile_noData";
-    
-    if(self.tag == 101){
-        imageName = @"uploadFile_noData";
-    }
-    else if(self.tag == 102){
-        imageName = @"uploadFile_noData";
-    }
+    NSString *imageName = @"common_no_data_pic";
     
     return [UIImage imageNamed:imageName];
 }
 
 - (NSAttributedString *)titleForEmptyDataSet:(UIScrollView *)scrollView {
-    NSString *text = NSLocalizedString(@"File_upload_Record_no_data",nil);
-    
-    if(self.tag == 101){
-        text = NSLocalizedString(@"File_download_Record_no_data",nil);
-    }
-    else if(self.tag == 102){
-        text = NSLocalizedString(@"File_backups_Record_no_data",nil);
-    }
+    NSString *text = NSLocalizedString(@"common_no_data_tip",nil);
     
     NSDictionary *attributes = @{NSFontAttributeName: [UIFont systemFontOfSize:16.0f],
                                  NSForegroundColorAttributeName: HW999999Color};

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

@@ -102,5 +102,7 @@
 - (void)AferGetBoxSaveDataBy:(NSMutableArray*)arr
 {
     _saveRecordTableView.outSideDataArr = arr;
+    
+    
 }
 @end

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

@@ -36,8 +36,15 @@ static boxSaveFileManager * cur_boxSaveFileShareInstance = nil;
 - (void)addBoxSaveRecordFunBy:(NSArray*)arr{
     if(arr && arr.count >0 ){
         
+        NSString * boxSaveDefaultPath = [HWDataManager getStringWithKey:stringKeyAddSn(Const_box_save_default_path)];
+        if(!boxSaveDefaultPath || boxSaveDefaultPath.length == 0){
+            boxSaveDefaultPath = Const_default_save_path;
+        }
+        
         for (ShareFileDataModel*model in arr) {
             model.bg_tableName = share_box_save_tableName;
+            
+            model.boxSavePath = boxSaveDefaultPath;
         }
         
         //[ShareFileDataModel bg_saveOrUpdateArray:arr];