Selaa lähdekoodia

1.走frp http方案处理创建云机文件夹

huangxiaodong 9 kuukautta sitten
vanhempi
commit
98c085109e

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

@@ -319,7 +319,7 @@
     
 }
 
-#pragma mark
+#pragma mark 信令通道创建 文件夹
 - (void)didGetFolderName:(NSString*)folderName withDiskPath:(NSString*)diskPathStr
 {
     _createFolderNameStr = folderName;
@@ -342,7 +342,53 @@
     }
     
     
-    [[webRtcManager shareManager] createBackupsFolderBy:curbackupsDefaultPath];
+    //[[webRtcManager shareManager] createBackupsFolderBy:curbackupsDefaultPath];
+    [self mkdirPathFunBy:curbackupsDefaultPath];
+}
+
+#pragma mark frp创建 文件夹
+- (void)mkdirPathFunBy:(NSString*)path
+{
+    NSMutableDictionary*paraDict = [NSMutableDictionary new];
+    if(path){
+        [paraDict setValue:path forKeyPath:@"path"];
+    }
+    
+    
+    KWeakSelf
+    [[netWorkManager shareInstance] cloudPhoneGETCallBackCode:@"mkdir" Parameters:paraDict success:^(id  _Nonnull responseObject) {
+        
+        SuperModel *model = [[SuperModel alloc] initWithDictionary:responseObject error:nil];
+        NSString * tipStr = @"";
+        if(model && model.status == 0){
+            tipStr = NSLocalizedString(@"File_upload_path_new_suc",nil);
+            if(self->_didChangeSavePathFun){
+                self->_didChangeSavePathFun();
+            }
+            
+            if(self->_curType == 2){
+                //相册自动备份
+                //[[backupsFileManager shareInstance] reBackupsFileFun];
+                [[nasBackupsManager shareInstance] reBackupsFileFun];
+            }
+        }
+        else if (model.status == 2){
+            tipStr = NSLocalizedString(@"File_upload_path_new_save",nil);
+        }
+        else{
+            tipStr = NSLocalizedString(@"File_upload_path_new_fail",nil);
+        }
+        
+        mainBlock(^{
+            [[iToast makeText:tipStr] show];
+        });
+        
+        [weakSelf getFolderListFun];
+    } failure:^(NSError * _Nonnull error) {
+        
+       
+    }];
+    
 }
 
 - (void)createFolderDoneNotFun:(NSNotification *)notification