Browse Source

1.上传备份路径设置

huangxiaodong 1 year ago
parent
commit
38abfbae26

+ 10 - 0
创维盒子/双子星云手机/AppDelegate/Config/Const.h

@@ -103,6 +103,16 @@ UIKIT_EXTERN NSString *const Const_file_backups_canUse_Cellular;
 
 /*标记是否低电量备份*/
 UIKIT_EXTERN NSString *const Const_file_backups_battery_level;
+
+/*相册上传默认路径*/
+UIKIT_EXTERN NSString *const Const_photo_upload_default_path;
+
+/*标记默认备份路径*/
+UIKIT_EXTERN NSString *const Const_default_backups_path;
+
+/*标记默认上传路径*/
+UIKIT_EXTERN NSString *const Const_default_upload_path;
+
 @end
 
 NS_ASSUME_NONNULL_END

+ 10 - 0
创维盒子/双子星云手机/AppDelegate/Config/Const.m

@@ -99,4 +99,14 @@ NSString *const Const_file_backups_canUse_Cellular = @"file_backups_canUse_Cellu
 
 /*标记是否低电量备份*/
 NSString *const Const_file_backups_battery_level = @"file_backups_battery_level";
+
+/*相册上传默认路径*/
+NSString *const Const_photo_upload_default_path = @"photo_upload_default_path";
+
+/*标记默认备份路径*/
+NSString *const Const_default_backups_path = @"/sdcard/Download/";
+
+/*标记默认上传路径*/
+NSString *const Const_default_upload_path = @"/sdcard/Download/";
+
 @end

+ 0 - 2
创维盒子/双子星云手机/AppDelegate/PrefixHeader.pch

@@ -88,8 +88,6 @@ isBangsScreen; \
 //#define CloudService   @"http://hiboxde.armclouding.com:7780"
 
 
-#define DefaultBackupsPath @"sdcard/Download"
-
 #define AESCODEKEEYY @"fvO8gAfNSr1tbdQe"
 
 

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

@@ -144,7 +144,7 @@
     NSString * backupsDefaultPath = [HWDataManager getStringWithKey:Const_photo_backups_default_path];
     
     if(!backupsDefaultPath || backupsDefaultPath.length == 0){
-        backupsDefaultPath = DefaultBackupsPath;
+        backupsDefaultPath = Const_default_backups_path;
         [HWDataManager setStringWithKey:Const_photo_backups_default_path value:backupsDefaultPath];
     }
     

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

@@ -138,7 +138,13 @@
 - (void)setUploadFilePathLabelTitleFun
 {
     NSString * leftStr = NSLocalizedString(@"File_upload_path_way",nil);
-    NSString * rightStr = @"我的空间/来自【手机设备名称】的相册备份";
+    
+    NSString * uploadDefaultPath = [HWDataManager getStringWithKey:Const_photo_upload_default_path];
+    if(!uploadDefaultPath || uploadDefaultPath.length == 0){
+        [HWDataManager setStringWithKey:Const_photo_upload_default_path value:Const_default_upload_path];
+    }
+    
+    NSString * rightStr = uploadDefaultPath;
     
     NSString *totalStr = [[NSString alloc] initWithFormat:@"%@%@",leftStr,rightStr];
     

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

@@ -246,7 +246,13 @@
 {
     _selectIndex = row;
     NSString *cutPath = _folderListArr[row];
-    [HWDataManager setStringWithKey:Const_photo_backups_default_path value:cutPath];
+    if(_curType == 2){
+        [HWDataManager setStringWithKey:Const_photo_backups_default_path value:cutPath];
+    }
+    else if(_curType == 1){
+        [HWDataManager setStringWithKey:Const_photo_upload_default_path value:cutPath];
+    }
+    
     [self.tableView reloadData];
     
 }
@@ -259,8 +265,14 @@
     //NSString *curbackupsDefaultPath = [[NSString alloc] initWithFormat:@"sdcard/%@",_createFolderNameStr];
     NSString *curbackupsDefaultPath = [[NSString alloc] initWithFormat:@"%@/%@",diskPathStr,_createFolderNameStr];
     
+    if(_curType == 2){
+        [HWDataManager setStringWithKey:Const_photo_backups_default_path value:curbackupsDefaultPath];
+    }
+    else if(_curType == 1){
+        [HWDataManager setStringWithKey:Const_photo_upload_default_path value:curbackupsDefaultPath];
+    }
     
-    [HWDataManager setStringWithKey:Const_photo_backups_default_path value:curbackupsDefaultPath];
+    //[HWDataManager setStringWithKey:Const_photo_backups_default_path value:curbackupsDefaultPath];
     
     [[NSNotificationCenter defaultCenter] postNotificationName:createFolderBeginNotification object:curbackupsDefaultPath];/*发送通知*/
 }
@@ -294,6 +306,10 @@
         
         NSString * backupsDefaultPath = [HWDataManager getStringWithKey:Const_photo_backups_default_path];
         
+        if(_curType == 1){
+            backupsDefaultPath = [HWDataManager getStringWithKey:Const_photo_upload_default_path];
+        }
+        
         NSString *lastbackupsStr = [backupsDefaultPath substringFromIndex:backupsDefaultPath.length -1];
         
         BOOL needAddHadDefaultPath = YES;

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

@@ -375,7 +375,12 @@
 {
     NSMutableArray *arr = [NSMutableArray new];
     if(outSizeArr && outSizeArr.count >0){
-        [arr addObjectsFromArray:outSizeArr];
+        
+        for (cloudPhoneExtraFileModel*model in outSizeArr) {
+            model.isCheckType = NO;
+            [arr addObject:model];
+        }
+        //[arr addObjectsFromArray:outSizeArr];
     }
     
 //    cloudPhoneExtraFileModel *defModel = [cloudPhoneExtraFileModel new];

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

@@ -44,7 +44,7 @@
     _uploadFileRoutelabel.font = [UIFont systemFontOfSize:14.0];
     _uploadFileRoutelabel.textColor = [UIColor hwColor:@"#959799" alpha:1.0];
     
-    _uploadFileRoutelabel.text = [[NSString alloc] initWithFormat:@"%@: %@",NSLocalizedString(@"File_upload_path_tip",nil),@"/sdcard/Download/"];
+    _uploadFileRoutelabel.text = [[NSString alloc] initWithFormat:@"%@: %@",NSLocalizedString(@"File_upload_path_tip",nil),Const_default_upload_path];
     
     [self addSubview:_uploadFileRoutelabel];
     

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

@@ -361,7 +361,7 @@
     }
     
     if(curUploadFileDataModel.curUploadStateType == uploadStateDone){
-        _fileProgresslabel.text = [[NSString alloc] initWithFormat:@"%@  %@:%@",totalSizeStr,NSLocalizedString(@"File_upload_to_tip",nil),@"/sdcard/Download/"];
+        _fileProgresslabel.text = [[NSString alloc] initWithFormat:@"%@  %@:%@",totalSizeStr,NSLocalizedString(@"File_upload_to_tip",nil),Const_default_upload_path];
     }
     else if(curUploadFileDataModel.curUploadStateType == uploadStateFail){
         _fileProgresslabel.text = [[NSString alloc] initWithFormat:@"%@",totalSizeStr];

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

@@ -53,7 +53,7 @@
     NSString * backupsDefaultPath = [HWDataManager getStringWithKey:Const_photo_backups_default_path];
     
     if(!backupsDefaultPath || backupsDefaultPath.length == 0){
-        backupsDefaultPath = DefaultBackupsPath;
+        backupsDefaultPath = Const_default_backups_path;
         [HWDataManager setStringWithKey:Const_photo_backups_default_path value:backupsDefaultPath];
     }