huangxiaodong 1 рік тому
батько
коміт
0e75950bba

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

@@ -142,6 +142,7 @@
     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];
+        uploadDefaultPath = Const_default_upload_path;
     }
     
     NSString * rightStr = uploadDefaultPath;

+ 3 - 0
创维盒子/双子星云手机/Class/Set/uploadFile/model/uploadFileDataModel.h

@@ -42,6 +42,9 @@ typedef enum{
 
 @property (nonatomic, assign) NSTimeInterval  preTimeInterval;//计算速度用
 @property (nonatomic, assign) NSTimeInterval  curTimeInterval;//计算速度用
+
+//1.3.1新增字段
+@property (nonatomic, copy)  NSString *savePath;
 @end
 
 NS_ASSUME_NONNULL_END

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

@@ -44,7 +44,11 @@
     _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),Const_default_upload_path];
+    NSString *savePath = [HWDataManager getStringWithKey:Const_photo_upload_default_path];
+    if(!savePath||savePath.length == 0){
+        savePath = Const_default_upload_path;
+    }
+    _uploadFileRoutelabel.text = [[NSString alloc] initWithFormat:@"%@: %@",NSLocalizedString(@"File_upload_path_tip",nil),savePath];
     
     [self addSubview:_uploadFileRoutelabel];
     

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

@@ -400,6 +400,9 @@ static uploadFileManager * cur_uploadFileShareInstance = nil;
     _curUploadFileDataModel.didUploadBytes = didUpLoadBytes;
     
     if(curUploadStateType == uploadStateDone){
+        
+        _curUploadFileDataModel.savePath = [HWDataManager getStringWithKey:Const_photo_upload_default_path];
+        
         _curUploadFileDataModel.videoData = [NSData new];
         
         if(_curUploadFileDataModel.curUploadFileType == uploadFileTypeVideo){

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

@@ -141,7 +141,7 @@
     
     [_fileProgresslabel mas_makeConstraints:^(MASConstraintMaker *make) {
         make.left.mas_equalTo(_fileImageView.mas_right).offset(10);
-        make.right.mas_equalTo(_progressBgView.mas_centerX).offset(100);
+        make.right.mas_equalTo(_progressBgView.mas_right).offset(-10);
         make.height.mas_equalTo(15);
         make.top.mas_equalTo(_progressBgView.mas_bottom).offset(3);
     }];
@@ -361,7 +361,13 @@
     }
     
     if(curUploadFileDataModel.curUploadStateType == uploadStateDone){
-        _fileProgresslabel.text = [[NSString alloc] initWithFormat:@"%@  %@:%@",totalSizeStr,NSLocalizedString(@"File_upload_to_tip",nil),Const_default_upload_path];
+        
+        NSString *savePath = curUploadFileDataModel.savePath;
+        if(!savePath||savePath.length == 0){
+            savePath = Const_default_upload_path;
+        }
+        
+        _fileProgresslabel.text = [[NSString alloc] initWithFormat:@"%@  %@:%@",totalSizeStr,NSLocalizedString(@"File_upload_to_tip",nil),savePath];
     }
     else if(curUploadFileDataModel.curUploadStateType == uploadStateFail){
         _fileProgresslabel.text = [[NSString alloc] initWithFormat:@"%@",totalSizeStr];

+ 14 - 0
创维盒子/双子星云手机/CloudPlayer/RCCommandHelp.m

@@ -981,6 +981,20 @@
 
 + (NSString *)applyForUploadFileBy:(NSString*)taskUid filePath:(NSString *)filePath
 {
+    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];
+        uploadDefaultPath = Const_default_upload_path;
+    }
+    
+    //判断最后一个是否是/
+    NSString *lastStr= [uploadDefaultPath substringFromIndex:uploadDefaultPath.length-1];
+    if(![lastStr isEqualToString:@"/"]){
+        uploadDefaultPath = [[NSString alloc] initWithFormat:@"%@/",uploadDefaultPath];
+    }
+    
+    filePath = [[NSString alloc] initWithFormat:@"%@%@",uploadDefaultPath,filePath];
+    
     NSString *dataStr =[NSString stringWithFormat:@"{\"data\":{\"taskUid\":\"%@\",\"filePath\":\"%@\"},\"type\":\"uploadFileRandom\"}",taskUid,filePath];
     
     if (USENEWCONTROLLCOMMONDNO500)