|
@@ -46,7 +46,7 @@
|
|
|
@property(nonatomic,strong) editTypeBottomView*curEditTypeBottomView;
|
|
|
@property(nonatomic,strong) UIButton*uploadFileButton;
|
|
|
|
|
|
-@property(nonatomic,strong) couldPhoneFileListModel *curCouldPhoneFileListMod;
|
|
|
+//@property(nonatomic,strong) couldPhoneFileListModel *curCouldPhoneFileListMod;
|
|
|
|
|
|
@property(nonatomic,strong) NASFilePicModel *curNASFilePicModel;
|
|
|
|
|
@@ -332,14 +332,14 @@
|
|
|
#pragma mark - 瀑布流委托
|
|
|
- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView {
|
|
|
if(_curNASFilePicModel){
|
|
|
- return _curNASFilePicModel.data.count;
|
|
|
+ return _curNASFilePicModel.data.fileList.count;
|
|
|
}
|
|
|
return 1;
|
|
|
}
|
|
|
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
|
|
|
|
|
|
- if(_curNASFilePicModel && _curNASFilePicModel.data.count >section){
|
|
|
- NASFilePicTimeArrModel *timeArrModel = _curNASFilePicModel.data[section];
|
|
|
+ if(_curNASFilePicModel && _curNASFilePicModel.data.fileList.count >section){
|
|
|
+ NASFilePicTimeArrModel *timeArrModel = _curNASFilePicModel.data.fileList[section];
|
|
|
return timeArrModel.list.count;
|
|
|
}
|
|
|
return 0;
|
|
@@ -356,8 +356,8 @@
|
|
|
}
|
|
|
|
|
|
|
|
|
- if(_curNASFilePicModel && _curNASFilePicModel.data.count > section){
|
|
|
- NASFilePicTimeArrModel *timeArrModel = _curNASFilePicModel.data[section];
|
|
|
+ if(_curNASFilePicModel && _curNASFilePicModel.data.fileList.count > section){
|
|
|
+ NASFilePicTimeArrModel *timeArrModel = _curNASFilePicModel.data.fileList[section];
|
|
|
if (timeArrModel.list.count > row) {
|
|
|
NASFilePicDataArrModel * dataModel = timeArrModel.list[row];
|
|
|
|
|
@@ -392,8 +392,8 @@
|
|
|
NSInteger section = indexPath.section;
|
|
|
titleLabelReusableView *headerView = [collectionView dequeueReusableSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:@"titleLabelReusableView" forIndexPath:indexPath];
|
|
|
|
|
|
- if(_curNASFilePicModel && _curNASFilePicModel.data.count > section){
|
|
|
- NASFilePicTimeArrModel *timeArrModel = _curNASFilePicModel.data[section];
|
|
|
+ if(_curNASFilePicModel && _curNASFilePicModel.data.fileList.count > section){
|
|
|
+ NASFilePicTimeArrModel *timeArrModel = _curNASFilePicModel.data.fileList[section];
|
|
|
headerView.titlelabel.text = timeArrModel.time;
|
|
|
}
|
|
|
return headerView;
|
|
@@ -412,8 +412,8 @@
|
|
|
NSInteger row = indexPath.row;
|
|
|
NSInteger section = indexPath.section;
|
|
|
|
|
|
- if(_curNASFilePicModel && _curNASFilePicModel.data.count > section){
|
|
|
- NASFilePicTimeArrModel *timeArrModel = _curNASFilePicModel.data[section];
|
|
|
+ if(_curNASFilePicModel && _curNASFilePicModel.data.fileList.count > section){
|
|
|
+ NASFilePicTimeArrModel *timeArrModel = _curNASFilePicModel.data.fileList[section];
|
|
|
if (timeArrModel.list.count > row) {
|
|
|
//NASFilePicDataArrModel * dataModel = timeArrModel.list[row];
|
|
|
|
|
@@ -541,21 +541,21 @@
|
|
|
|
|
|
- (void)userCheckFilePreviewByRow:(NSInteger)row
|
|
|
{
|
|
|
- if(row < _curCouldPhoneFileListMod.data.list.count){
|
|
|
- couldPhoneFileModel* fileModel = _curCouldPhoneFileListMod.data.list[row];
|
|
|
-
|
|
|
- if(fileModel.isSelectType){
|
|
|
- [_didSelectListArr removeObject:fileModel];
|
|
|
- }
|
|
|
- else{
|
|
|
- [_didSelectListArr addObject:fileModel];
|
|
|
- }
|
|
|
-
|
|
|
- fileModel.isSelectType = !fileModel.isSelectType;
|
|
|
- //[self.tableView reloadData];
|
|
|
- //[self.dataCollectionView reloadData];
|
|
|
- [self setEditTypeTitleFun];
|
|
|
- }
|
|
|
+// if(row < _curCouldPhoneFileListMod.data.list.count){
|
|
|
+// couldPhoneFileModel* fileModel = _curCouldPhoneFileListMod.data.list[row];
|
|
|
+//
|
|
|
+// if(fileModel.isSelectType){
|
|
|
+// [_didSelectListArr removeObject:fileModel];
|
|
|
+// }
|
|
|
+// else{
|
|
|
+// [_didSelectListArr addObject:fileModel];
|
|
|
+// }
|
|
|
+//
|
|
|
+// fileModel.isSelectType = !fileModel.isSelectType;
|
|
|
+// //[self.tableView reloadData];
|
|
|
+// //[self.dataCollectionView reloadData];
|
|
|
+// [self setEditTypeTitleFun];
|
|
|
+// }
|
|
|
}
|
|
|
|
|
|
- (void)didClickSelectAllButton:(UIButton*)button
|
|
@@ -565,22 +565,22 @@
|
|
|
|
|
|
[_didSelectListArr removeAllObjects];
|
|
|
|
|
|
- for (couldPhoneFileModel* fileModel in _curCouldPhoneFileListMod.data.list) {
|
|
|
-
|
|
|
- if(!button.selected){
|
|
|
- fileModel.isSelectType = button.selected;
|
|
|
- }
|
|
|
- else{
|
|
|
- [_didSelectListArr addObject:fileModel];
|
|
|
- if([self userCheckFileModel:fileModel withShowTip:NO]){
|
|
|
- fileModel.isSelectType = button.selected;
|
|
|
- }
|
|
|
- else{
|
|
|
- isNeedShowTip = YES;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
+// for (couldPhoneFileModel* fileModel in _curCouldPhoneFileListMod.data.list) {
|
|
|
+//
|
|
|
+// if(!button.selected){
|
|
|
+// fileModel.isSelectType = button.selected;
|
|
|
+// }
|
|
|
+// else{
|
|
|
+// [_didSelectListArr addObject:fileModel];
|
|
|
+// if([self userCheckFileModel:fileModel withShowTip:NO]){
|
|
|
+// fileModel.isSelectType = button.selected;
|
|
|
+// }
|
|
|
+// else{
|
|
|
+// isNeedShowTip = YES;
|
|
|
+// }
|
|
|
+// }
|
|
|
+//
|
|
|
+// }
|
|
|
|
|
|
if(isNeedShowTip){
|
|
|
if(_isPhotoType){
|
|
@@ -846,11 +846,23 @@
|
|
|
[paraDict setValue:@"video" forKey:@"type"];
|
|
|
}
|
|
|
|
|
|
+ NSArray *diskNameArr = [_defaultDiskPath componentsSeparatedByString:@"/"];
|
|
|
+ if(diskNameArr && diskNameArr.count >= 2){
|
|
|
+
|
|
|
+ NSString *name = diskNameArr.lastObject;
|
|
|
+ if(name.length == 0)
|
|
|
+ {
|
|
|
+ name = diskNameArr[diskNameArr.count -2];
|
|
|
+ }
|
|
|
+
|
|
|
+ [paraDict setValue:name forKey:@"path"];
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
[self showNewIndicatorHaveStrWithCanBack:YES canTouch:NO showText:NSLocalizedString(@"common_loading_tip",nil)];
|
|
|
|
|
|
KWeakSelf
|
|
|
- [[netWorkManager shareInstance] cloudPhoneGETCallBackCode:@"getFileList" Parameters:paraDict success:^(id _Nonnull responseObject) {
|
|
|
+ [[netWorkManager shareInstance] cloudPhoneGETCallBackCode:@"getFileListByDay" Parameters:paraDict success:^(id _Nonnull responseObject) {
|
|
|
[weakSelf removeNewIndicatorHaveStr];
|
|
|
weakSelf.curNASFilePicModel = [[NASFilePicModel alloc] initWithDictionary:responseObject error:nil];
|
|
|
[weakSelf.dataCollectionView reloadData];
|
|
@@ -866,8 +878,8 @@
|
|
|
NSMutableArray *totalArr = [NSMutableArray new];
|
|
|
NSInteger index = 0;
|
|
|
|
|
|
- for (int i=0; i<_curNASFilePicModel.data.count; i++) {
|
|
|
- NASFilePicTimeArrModel *timeModel = _curNASFilePicModel.data[i];
|
|
|
+ for (int i=0; i<_curNASFilePicModel.data.fileList.count; i++) {
|
|
|
+ NASFilePicTimeArrModel *timeModel = _curNASFilePicModel.data.fileList[i];
|
|
|
|
|
|
if(i == section){
|
|
|
index = totalArr.count + row;
|