|
@@ -10,6 +10,7 @@
|
|
|
#import "editTypeBottomView.h"
|
|
|
#import "editShareView.h"
|
|
|
#import "NASFilePicModel.h"
|
|
|
+#import "uploadFileRecordViewController.h"
|
|
|
|
|
|
@interface imageDetailsScrollViewController ()
|
|
|
{
|
|
@@ -51,13 +52,15 @@
|
|
|
#pragma mark 编辑状态的 下载 分享 删除 响应事件
|
|
|
_curEditTypeBottomView.didClickButtonFun = ^(NSInteger tag) {
|
|
|
if(tag==1){
|
|
|
- [[iToast makeText:@"点击下载"] show];
|
|
|
+ //[[iToast makeText:@"点击下载"] show];
|
|
|
+ [weakSelf gotoDownLoadFileFun];
|
|
|
}
|
|
|
else if(tag==2){
|
|
|
[weakSelf gotoShareViewFun];
|
|
|
}
|
|
|
else if(tag==3){
|
|
|
- [[iToast makeText:@"点击删除"] show];
|
|
|
+ //[[iToast makeText:@"点击删除"] show];
|
|
|
+ [weakSelf delFileListFun];
|
|
|
}
|
|
|
};
|
|
|
}
|
|
@@ -111,6 +114,7 @@
|
|
|
});
|
|
|
|
|
|
_curScrollView.itemDidScrollOperationBlock = ^(NSInteger currentIndex) {
|
|
|
+ weakSelf.index = currentIndex;
|
|
|
[weakSelf setTitleLabelTextFunBy:currentIndex];
|
|
|
};
|
|
|
}
|
|
@@ -122,4 +126,55 @@
|
|
|
self.titleLabel.text = dataModel.name;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+#pragma mark 删除文件数据
|
|
|
+- (void)delFileListFun
|
|
|
+{
|
|
|
+ NSMutableDictionary*paraDict = [NSMutableDictionary new];
|
|
|
+
|
|
|
+ if(_index >=0 && _index < _totalDataArr.count){
|
|
|
+ NASFilePicDataArrModel *dataModel = _totalDataArr[_index];
|
|
|
+ NSArray *pathArr = @[dataModel.path];
|
|
|
+ [paraDict setValue:pathArr forKey:@"path"];
|
|
|
+ }
|
|
|
+
|
|
|
+ [self showNewIndicatorWithCanBack:YES canTouch:NO];
|
|
|
+
|
|
|
+ //NSString*code = [[NSString alloc] initWithFormat:@"delFile?path=%@",paraDict[@"path"]]; //delFile?path=[/storage/emulated/0/Download/IMG_6464.HEIC]
|
|
|
+ KWeakSelf //@"delFile"
|
|
|
+ [[netWorkManager shareInstance] cloudPhoneGETCallBackCode:@"delFile" Parameters:paraDict success:^(id _Nonnull responseObject) {
|
|
|
+ [weakSelf removeNewIndicator];
|
|
|
+ SuperModel *model = [[SuperModel alloc] initWithDictionary:responseObject error:nil];
|
|
|
+ if(model && model.status == 0){
|
|
|
+
|
|
|
+ }
|
|
|
+ else{
|
|
|
+
|
|
|
+ }
|
|
|
+ } failure:^(NSError * _Nonnull error) {
|
|
|
+ [weakSelf removeNewIndicator];
|
|
|
+ }];
|
|
|
+}
|
|
|
+
|
|
|
+- (void)gotoDownLoadFileFun
|
|
|
+{
|
|
|
+ if(_index >=0 && _index < _totalDataArr.count){
|
|
|
+ NASFilePicDataArrModel *dataModel = _totalDataArr[_index];
|
|
|
+
|
|
|
+ couldPhoneFileModel* fileModel = [couldPhoneFileModel new];
|
|
|
+ fileModel.fileType = @".jpg";
|
|
|
+ fileModel.path = dataModel.path;
|
|
|
+ fileModel.name = dataModel.name;
|
|
|
+ fileModel.length = dataModel.size;
|
|
|
+
|
|
|
+ NSMutableArray *arr = [NSMutableArray new];
|
|
|
+ [arr addObject:fileModel];
|
|
|
+
|
|
|
+ uploadFileRecordViewController *vc = [uploadFileRecordViewController new];
|
|
|
+ [self.navigationController pushViewController:vc animated:YES];
|
|
|
+ vc.isDownloadingType = YES;
|
|
|
+ [vc gotoDownloadFile:arr];
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
@end
|