|
|
@@ -228,7 +228,56 @@
|
|
|
[self.view addSubview:bottomView];
|
|
|
self.photoPreViewBottomV = bottomView;
|
|
|
|
|
|
- self.photoPreViewBottomV.availableStorage = _availableStorage;
|
|
|
+ NSString * uploadDefaultPath = [HWDataManager getStringWithKey:Const_photo_upload_default_path];
|
|
|
+
|
|
|
+ BOOL isExtraFileType = NO;
|
|
|
+ BOOL isExtraPathFind = NO;
|
|
|
+ if(uploadDefaultPath){
|
|
|
+ if(![uploadDefaultPath containsString:@"sdcard/"]){
|
|
|
+ isExtraFileType = YES;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if(uploadDefaultPath && ksharedAppDelegate.cloudPhoneExtraFileListMod){
|
|
|
+ NSArray*arr = ksharedAppDelegate.cloudPhoneExtraFileListMod.data;
|
|
|
+
|
|
|
+ for (cloudPhoneExtraFileModel*model in arr) {
|
|
|
+ if([uploadDefaultPath containsString:model.extraPath]){
|
|
|
+
|
|
|
+ NSString * availableStorage = @"";
|
|
|
+ NSInteger totalSize_k = model.extraAvableSize / 1024;
|
|
|
+ if(totalSize_k < 1024){
|
|
|
+ availableStorage = [[NSString alloc] initWithFormat:@"%ldKB",totalSize_k];
|
|
|
+ }
|
|
|
+ else if( totalSize_k >= 1024 && totalSize_k < 1024*1024){
|
|
|
+ availableStorage = [[NSString alloc] initWithFormat:@"%.1fMB",totalSize_k/1024.0];
|
|
|
+
|
|
|
+ }
|
|
|
+ else{
|
|
|
+ availableStorage = [[NSString alloc] initWithFormat:@"%.2fG",totalSize_k/1024.0/1024.0];
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ self.photoPreViewBottomV.availableStorage = availableStorage;
|
|
|
+ //self.photoPreViewBottomV.available = model.extraAvableSize;
|
|
|
+ isExtraPathFind = YES;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ if(!isExtraFileType){
|
|
|
+ self.photoPreViewBottomV.availableStorage = _availableStorage;
|
|
|
+ //self.photoPreViewBottomV.available = baseInfoModel.data.available;
|
|
|
+ }
|
|
|
+
|
|
|
+ if(isExtraFileType && !isExtraPathFind){
|
|
|
+ self.photoPreViewBottomV.isExtraFileAndNotFindPathType = YES;
|
|
|
+ }
|
|
|
+
|
|
|
+ //self.photoPreViewBottomV.availableStorage = _availableStorage;
|
|
|
[self setDataToBottomViewFun];
|
|
|
|
|
|
[bottomView mas_makeConstraints:^(MASConstraintMaker *make) {
|