uploadImageOrVideoViewController.m 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570
  1. //
  2. // uploadImageOrVideoViewController.m
  3. // 隐私保护
  4. //
  5. // Created by xd h on 2023/11/9.
  6. //
  7. #import "uploadImageOrVideoViewController.h"
  8. #import <AssetsLibrary/AssetsLibrary.h>
  9. #import <AVFoundation/AVFoundation.h>
  10. #import "AJPhotoListView.h"
  11. #import "AJPhotoGroupView.h"
  12. #import "AJPhotoListCell.h"
  13. #import "uploadFileBottomView.h"
  14. #import "PhotoPreviewViewController.h"
  15. #import "TZAssetModel+imageData.h"
  16. #import "uploadFileRecordViewController.h"
  17. #import "couldPhoneBaseInfoModel.h"
  18. @interface uploadImageOrVideoViewController ()<AJPhotoGroupViewProtocol,UICollectionViewDataSource,UICollectionViewDelegate,UICollectionViewDelegateFlowLayout>
  19. @property (strong, nonatomic) AJPhotoGroupView *photoGroupView;
  20. @property (strong, nonatomic) UILabel *MytitleLabel;
  21. @property (strong, nonatomic) UIImageView *selectTip;
  22. @property (nonatomic) BOOL isNotAllowed;
  23. @property (strong, nonatomic) UIView *bgMaskView;
  24. @property (strong, nonatomic) AJPhotoListView *photoListView;
  25. @property (strong, nonatomic) NSMutableArray *assets;
  26. @property (strong, nonatomic) NSIndexPath *lastAccessed;
  27. @property (strong, nonatomic) uploadFileBottomView *uploadFileBottomV;
  28. //最多选择项
  29. @property (nonatomic, assign) NSInteger maximumNumberOfSelection;
  30. //最少选择项
  31. @property (nonatomic, assign) NSInteger minimumNumberOfSelection;
  32. //是否开启多选
  33. @property (nonatomic, assign) BOOL multipleSelection;
  34. @end
  35. @implementation uploadImageOrVideoViewController
  36. - (void)viewDidLoad {
  37. [super viewDidLoad];
  38. // Do any additional setup after loading the view.
  39. [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(getCouldPhoneBaseInfoFun:) name:getCouldPhoneBaseInfoNotification object:nil];
  40. [self.view setBackgroundColor:HWF5F7FAColor];
  41. [self.toolBar setHidden:YES];
  42. [self.navigationBar setHidden:YES];
  43. [self.navBarBGView setHidden:NO];
  44. [self initBaselUIFun];
  45. _isNotAllowed = YES;
  46. _maximumNumberOfSelection = 30;
  47. _minimumNumberOfSelection = 0;
  48. _multipleSelection = YES;
  49. if(!_selectionFilter)
  50. {
  51. _selectionFilter = [NSPredicate predicateWithValue:YES];
  52. }
  53. [self checkVideoAccessFun];
  54. }
  55. - (void)initBaselUIFun
  56. {
  57. [self initNavHeadUIFun];
  58. //列表view
  59. [self setupPhotoListView];
  60. [self setupUploadFileBottomView];
  61. //相册分组
  62. [self setupGroupView];
  63. }
  64. - (void)initNavHeadUIFun
  65. {
  66. //title
  67. UILabel *titleLabel = [[UILabel alloc] init];
  68. titleLabel.textAlignment = NSTextAlignmentCenter;
  69. titleLabel.font = [UIFont boldSystemFontOfSize:18.0];
  70. titleLabel.translatesAutoresizingMaskIntoConstraints = NO;
  71. [self.navBarBGView addSubview:titleLabel];
  72. self.MytitleLabel = titleLabel;
  73. //selectTipImageView
  74. UIImageView *selectTip = [[UIImageView alloc] init];
  75. selectTip.image = [UIImage imageNamed:@"upload_image_arrow"];
  76. selectTip.translatesAutoresizingMaskIntoConstraints = NO;
  77. [self.navBarBGView addSubview:selectTip];
  78. self.selectTip = selectTip;
  79. UIButton *tapBtn = [UIButton buttonWithType:UIButtonTypeCustom];
  80. tapBtn.backgroundColor = [UIColor clearColor];
  81. tapBtn.translatesAutoresizingMaskIntoConstraints = NO;
  82. [tapBtn addTarget:self action:@selector(selectGroupAction:) forControlEvents:UIControlEventTouchUpInside];
  83. [self.navBarBGView addSubview:tapBtn];
  84. [tapBtn mas_makeConstraints:^(MASConstraintMaker *make) {
  85. make.centerX.mas_equalTo(self.navBarBGView.mas_centerX);
  86. make.centerY.mas_equalTo(self.backBtn.mas_centerY);
  87. make.width.mas_equalTo(100);
  88. make.height.mas_equalTo(30);
  89. }];
  90. [self setTitleLabelText:@""];
  91. UIButton *rightBut = [[UIButton alloc] init];
  92. [rightBut setTitle:NSLocalizedString(@"File_upload_Record_select_all",nil) forState:UIControlStateNormal];
  93. [rightBut setTitle:NSLocalizedString(@"File_upload_cancel_select_all",nil) forState:UIControlStateSelected];
  94. [rightBut setTitleColor:[UIColor hwColor:@"#01B7EA" alpha:1.0] forState:UIControlStateNormal];
  95. rightBut.contentHorizontalAlignment = UIControlContentHorizontalAlignmentRight;
  96. [rightBut addTarget:self action:@selector(didClickSelectAllButton:) forControlEvents:UIControlEventTouchUpInside];
  97. [self.navBarBGView addSubview:rightBut];
  98. [rightBut mas_makeConstraints:^(MASConstraintMaker *make) {
  99. make.right.mas_equalTo(-20);
  100. make.centerY.mas_equalTo(self.backBtn.mas_centerY);
  101. make.width.mas_equalTo(100);
  102. make.height.mas_equalTo(30);
  103. }];
  104. }
  105. #pragma mark 设置相册标题
  106. - (void)setTitleLabelText:(NSString*)title
  107. {
  108. self.MytitleLabel.text = title;
  109. CGFloat curWidth = [title boundingRectWithSize:CGSizeMake(SCREEN_W, 30) options:(NSStringDrawingUsesLineFragmentOrigin) attributes:@{NSFontAttributeName:[UIFont boldSystemFontOfSize:18.f]} context:nil].size.width;
  110. curWidth += 20;
  111. //HLog(@"title w:%f",curWidth);
  112. [self.MytitleLabel mas_remakeConstraints:^(MASConstraintMaker *make) {
  113. make.centerX.mas_equalTo(self.navBarBGView.mas_centerX).offset(-10);
  114. make.centerY.mas_equalTo(self.backBtn.mas_centerY);
  115. make.width.mas_equalTo(curWidth);
  116. make.height.mas_equalTo(30);
  117. }];
  118. //self.MytitleLabel.backgroundColor = [UIColor greenColor];
  119. [self.selectTip mas_makeConstraints:^(MASConstraintMaker *make) {
  120. make.left.mas_equalTo(self.MytitleLabel.mas_right).offset(2);
  121. make.centerY.mas_equalTo(self.backBtn.mas_centerY);
  122. make.width.mas_equalTo(15);
  123. make.height.mas_equalTo(15);
  124. }];
  125. }
  126. #pragma mark 点击全选
  127. - (void)didClickSelectAllButton:(UIButton*)but
  128. {
  129. but.selected = !but.selected;
  130. if(but.selected){
  131. [self.indexPathsForSelectedItems removeAllObjects];
  132. for (TZAssetModel *model in self.assets) {
  133. [self didSelectModel:model];
  134. }
  135. }
  136. else{
  137. for (TZAssetModel *model in self.assets) {
  138. model.isSelected = NO;
  139. }
  140. [self.indexPathsForSelectedItems removeAllObjects];
  141. }
  142. [self refreshAllDataFun];
  143. }
  144. #pragma mark 判断手机相册权限
  145. - (void)checkVideoAccessFun
  146. {
  147. AVAuthorizationStatus authStatus =[AVCaptureDevice authorizationStatusForMediaType:AVMediaTypeVideo];
  148. //判断摄像头状态是否可用
  149. if(authStatus==AVAuthorizationStatusAuthorized){
  150. _isNotAllowed = NO;
  151. }else{
  152. NSLog(@"未开启相机权限,请前往设置中开启");
  153. [AVCaptureDevice requestAccessForMediaType:AVMediaTypeVideo completionHandler:^(BOOL granted) {
  154. if (granted){
  155. self->_isNotAllowed = NO;
  156. // mainBlock(^{
  157. //
  158. // });
  159. }
  160. }];
  161. }
  162. //相册权限
  163. if (![[TZImageManager manager] authorizationStatusAuthorized]){
  164. [PHPhotoLibrary requestAuthorization:^(PHAuthorizationStatus status) {
  165. if(status == PHAuthorizationStatusAuthorized){
  166. dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
  167. [self.photoGroupView setupGroup];
  168. [self delayedSetPhotoGroupViewFrameFun];
  169. });
  170. }
  171. }];
  172. }
  173. }
  174. /**
  175. * 照片列表
  176. */
  177. - (void)setupPhotoListView {
  178. AJPhotoListView *collectionView = [[AJPhotoListView alloc] init];
  179. collectionView.dataSource = self;
  180. collectionView.delegate = self;
  181. collectionView.translatesAutoresizingMaskIntoConstraints = NO;
  182. [self.view insertSubview:collectionView atIndex:0];
  183. self.photoListView = collectionView;
  184. [collectionView mas_makeConstraints:^(MASConstraintMaker *make) {
  185. make.left.mas_equalTo(0);
  186. make.right.mas_equalTo(0);
  187. make.bottom.mas_equalTo(-(60 + safeArea));
  188. make.top.equalTo(self.navBarBGView.mas_bottom).offset(0.f);
  189. }];
  190. }
  191. /**
  192. * 照片列表
  193. */
  194. - (void)setupUploadFileBottomView
  195. {
  196. uploadFileBottomView *bottomView = [[uploadFileBottomView alloc] init];
  197. [self.view insertSubview:bottomView atIndex:0];
  198. self.uploadFileBottomV = bottomView;
  199. [bottomView mas_makeConstraints:^(MASConstraintMaker *make) {
  200. make.left.mas_equalTo(0);
  201. make.right.mas_equalTo(0);
  202. make.bottom.mas_equalTo(0);
  203. make.height.mas_equalTo(60 + safeArea);
  204. }];
  205. KWeakSelf
  206. bottomView.didClickUploadFile = ^{
  207. [weakSelf gotoUploadFileRecordFun];
  208. };
  209. }
  210. /**
  211. * 相册
  212. */
  213. - (void)setupGroupView {
  214. AJPhotoGroupView *photoGroupView = [[AJPhotoGroupView alloc] init];
  215. photoGroupView.my_delegate = self;
  216. photoGroupView.isPhotoType = _isPhotoType;
  217. [self.view insertSubview:photoGroupView belowSubview:self.navBarBGView];
  218. self.photoGroupView = photoGroupView;
  219. photoGroupView.hidden = YES;
  220. photoGroupView.translatesAutoresizingMaskIntoConstraints = NO;
  221. [self.photoGroupView setupGroup];
  222. [self delayedSetPhotoGroupViewFrameFun];
  223. }
  224. #pragma mark 延时设置photoGroupView frame
  225. - (void)delayedSetPhotoGroupViewFrameFun
  226. {
  227. dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
  228. NSInteger maxCount = 6;
  229. if(self.photoGroupView.albumGroups.count < maxCount){
  230. maxCount = self.photoGroupView.albumGroups.count;
  231. }
  232. [self.photoGroupView mas_remakeConstraints:^(MASConstraintMaker *make) {
  233. make.left.mas_equalTo(0);
  234. make.right.mas_equalTo(0);
  235. make.height.mas_equalTo(60.0 * maxCount);
  236. make.top.equalTo(self.navBarBGView.mas_bottom).offset(0.f);
  237. }];
  238. });
  239. }
  240. #pragma mark - 相册切换
  241. - (void)selectGroupAction:(UIButton *)sender {
  242. //无权限
  243. if (self.isNotAllowed) {
  244. return;
  245. }
  246. if (self.photoGroupView.hidden) {
  247. [self bgMaskView];
  248. self.bgMaskView.hidden = NO;
  249. self.photoGroupView.hidden = NO;
  250. [UIView animateWithDuration:0.3 animations:^{
  251. CGRect rect = self.photoGroupView.frame;
  252. rect.origin.y = CGRectGetMaxY(self.navBarBGView.frame);
  253. self.photoGroupView.frame = rect;
  254. self.selectTip.transform = CGAffineTransformMakeRotation(M_PI);
  255. }];
  256. } else {
  257. [self hidenGroupView];
  258. }
  259. }
  260. - (void)hidenGroupView {
  261. //[self.bgMaskView removeFromSuperview];
  262. self.bgMaskView.hidden = YES;
  263. [UIView animateWithDuration:0.3 animations:^{
  264. CGRect rect = self.photoGroupView.frame;
  265. rect.origin.y = -SCREEN_H;
  266. self.photoGroupView.frame = rect;
  267. self.selectTip.transform = CGAffineTransformIdentity;
  268. }completion:^(BOOL finished) {
  269. self.photoGroupView.hidden = YES;
  270. }];
  271. }
  272. #pragma mark - 遮罩背景
  273. - (UIView *)bgMaskView {
  274. if (_bgMaskView == nil) {
  275. UIView *bgMaskView = [[UIView alloc] init];
  276. bgMaskView.alpha = 0.5;
  277. bgMaskView.translatesAutoresizingMaskIntoConstraints = NO;
  278. bgMaskView.backgroundColor = [UIColor blackColor];
  279. //[self.view insertSubview:bgMaskView aboveSubview:self.photoListView];
  280. [self.view insertSubview:bgMaskView belowSubview:self.photoGroupView];
  281. bgMaskView.userInteractionEnabled = YES;
  282. [bgMaskView addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapBgMaskView:)]];
  283. _bgMaskView = bgMaskView;
  284. [bgMaskView mas_makeConstraints:^(MASConstraintMaker *make) {
  285. make.left.mas_equalTo(0);
  286. make.right.mas_equalTo(0);
  287. make.bottom.mas_equalTo(0);
  288. make.top.equalTo(self.navBarBGView.mas_bottom).offset(0.f);
  289. }];
  290. }
  291. return _bgMaskView;
  292. }
  293. - (void)tapBgMaskView:(UITapGestureRecognizer *)sender {
  294. if (!self.photoGroupView.hidden) {
  295. [self hidenGroupView];
  296. }
  297. }
  298. #pragma mark - BoPhotoGroupViewProtocol
  299. - (void)didSelectGroup:(TZAlbumModel *)model {
  300. [self loadAssets:model];
  301. [self setTitleLabelText:model.name];
  302. [self hidenGroupView];
  303. }
  304. //加载图片
  305. - (void)loadAssets:(TZAlbumModel *)model {
  306. [self.indexPathsForSelectedItems removeAllObjects];
  307. [self.assets removeAllObjects];
  308. [[TZImageManager manager] getAssetsFromFetchResult:model.result completion:^(NSArray<TZAssetModel *> *models) {
  309. self->_assets = [NSMutableArray arrayWithArray:models];
  310. [self.photoListView scrollRectToVisible:CGRectMake(0, 0, 1, 1) animated:YES];
  311. [self.photoListView reloadData];
  312. }];
  313. }
  314. #pragma mark - uicollectionDelegate
  315. - (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
  316. return self.assets.count;
  317. }
  318. - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
  319. static NSString *cellIdentifer = @"cell";
  320. AJPhotoListCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:cellIdentifer forIndexPath:indexPath];
  321. BOOL isSelected = [self.indexPathsForSelectedItems containsObject:self.assets[indexPath.row]];
  322. [cell bind:self.assets[indexPath.row] selectionFilter:self.selectionFilter isSelected:isSelected];
  323. KWeakSelf
  324. cell.didClckSelectBut = ^(BOOL isSelect) {
  325. [weakSelf handlCellSelectFunBy:indexPath];
  326. };
  327. return cell;
  328. }
  329. - (UIEdgeInsets)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout insetForSectionAtIndex:(NSInteger)section {
  330. return UIEdgeInsetsMake(5, 5, 5, 5);
  331. }
  332. - (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath {
  333. CGFloat wh = (collectionView.bounds.size.width - 20)/3.0;
  334. return CGSizeMake(wh, wh);
  335. }
  336. - (CGFloat)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout minimumLineSpacingForSectionAtIndex:(NSInteger)section {
  337. return 5.0;
  338. }
  339. - (CGFloat)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout minimumInteritemSpacingForSectionAtIndex:(NSInteger)section {
  340. return 5.0;
  341. }
  342. - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
  343. PhotoPreviewViewController *vc =[PhotoPreviewViewController new];
  344. vc.assets = _assets;
  345. vc.currentIndex = indexPath.row;
  346. vc.indexPathsForSelectedItems = _indexPathsForSelectedItems;
  347. vc.maximumNumberOfSelection = _maximumNumberOfSelection;
  348. vc.minimumNumberOfSelection = _minimumNumberOfSelection;
  349. vc.availableStorage = self.uploadFileBottomV.availableStorage;
  350. [self.navigationController pushViewController:vc animated:YES];
  351. KWeakSelf
  352. vc.changeSelectIndex = ^(NSMutableArray * _Nonnull indexPathsForSelectedItems) {
  353. [weakSelf refreshDataAndUIFunWith:indexPathsForSelectedItems];
  354. };
  355. }
  356. #pragma mark 从详情页回来 刷新数据和UI
  357. - (void)refreshDataAndUIFunWith:(NSMutableArray *)indexPathsForSelectedItems
  358. {
  359. self.indexPathsForSelectedItems = indexPathsForSelectedItems;
  360. [self refreshAllDataFun];
  361. }
  362. #pragma mark 刷新所有数据
  363. - (void)refreshAllDataFun
  364. {
  365. [self setDataToBottomViewFun];
  366. [self.photoListView reloadData];
  367. }
  368. #pragma mark 处理点击选中相关
  369. - (void)handlCellSelectFunBy:(NSIndexPath *)indexPath
  370. {
  371. AJPhotoListCell *cell = (AJPhotoListCell *)[self.photoListView cellForItemAtIndexPath:indexPath];
  372. TZAssetModel *model = self.assets[indexPath.row];
  373. //超出最大限制
  374. if (self.indexPathsForSelectedItems.count >= self.maximumNumberOfSelection ) {
  375. return;
  376. }
  377. //取消选中
  378. if ([self.indexPathsForSelectedItems containsObject:model]) {
  379. [self.indexPathsForSelectedItems removeObject:model];
  380. model.isSelected = NO;
  381. [cell isSelected:NO];
  382. }
  383. else
  384. {//选中
  385. [self didSelectModel:model];
  386. [cell isSelected:YES];
  387. }
  388. [self setDataToBottomViewFun];
  389. }
  390. #pragma mark 选中某个cell
  391. - (void)didSelectModel:(TZAssetModel *)model
  392. {//选中
  393. [self.indexPathsForSelectedItems addObject:model];
  394. model.isSelected = YES;
  395. if(!model.totalBytes)
  396. {
  397. [[PHImageManager defaultManager] requestImageDataForAsset:model.asset options:nil resultHandler:^(NSData * _Nullable imageData, NSString * _Nullable dataUTI, UIImageOrientation orientation, NSDictionary * _Nullable info) {
  398. // 直接得到最终的 NSData 数据
  399. if (imageData) {
  400. //model.imageData = imageData;
  401. model.totalBytes = [imageData length];
  402. }
  403. if(model.type != TZAssetModelMediaTypeVideo){
  404. [self setDataToBottomViewFun];
  405. }
  406. }];
  407. if(model.type == TZAssetModelMediaTypeVideo){
  408. PHVideoRequestOptions *options = [[PHVideoRequestOptions alloc] init];
  409. options.version = PHVideoRequestOptionsVersionOriginal;
  410. [[PHImageManager defaultManager] requestAVAssetForVideo:model.asset options:options resultHandler:^(AVAsset *asset, AVAudioMix *audioMix, NSDictionary *info) {
  411. if ([asset isKindOfClass:[AVURLAsset class]]) {
  412. AVURLAsset* urlAsset = (AVURLAsset*)asset;
  413. //NSData *videoData = [NSData dataWithContentsOfURL:urlAsset.URL];
  414. NSNumber *size;
  415. [urlAsset.URL getResourceValue:&size forKey:NSURLFileSizeKey error:nil];
  416. //NSLog(@"size is %f",[size floatValue]/(1024.0*1024.0));
  417. //model.videoData = videoData;
  418. //model.totalBytes = [videoData length];
  419. model.totalBytes = size.longLongValue;
  420. [self setDataToBottomViewFun];
  421. }
  422. }];
  423. }
  424. }
  425. }
  426. #pragma mark 同步数据到底部
  427. - (void)setDataToBottomViewFun
  428. {
  429. mainBlock(^{
  430. self.uploadFileBottomV.indexPathsForSelectedItems = self.indexPathsForSelectedItems;
  431. });
  432. }
  433. #pragma mark - getter/setter
  434. - (NSMutableArray *)assets {
  435. if (!_assets) {
  436. _assets = [[NSMutableArray alloc] init];
  437. }
  438. return _assets;
  439. }
  440. - (NSMutableArray *)indexPathsForSelectedItems {
  441. if (!_indexPathsForSelectedItems) {
  442. _indexPathsForSelectedItems = [[NSMutableArray alloc] init];
  443. }
  444. return _indexPathsForSelectedItems;
  445. }
  446. #pragma mark 跳转上传记录
  447. - (void)gotoUploadFileRecordFun
  448. {
  449. uploadFileRecordViewController *vc = [uploadFileRecordViewController new];
  450. [self.navigationController pushViewController:vc animated:YES];
  451. vc.isUploadingType = YES;
  452. [vc gotoUploadFile:_indexPathsForSelectedItems];
  453. }
  454. - (void)getCouldPhoneBaseInfoFun:(NSNotification*)not
  455. {
  456. couldPhoneBaseInfoModel *baseInfoModel = [not object];
  457. //HLog(@"%@",baseInfoModel);
  458. if(!baseInfoModel || ![baseInfoModel isKindOfClass:[couldPhoneBaseInfoModel class]]){
  459. return;
  460. }
  461. self.uploadFileBottomV.availableStorage = baseInfoModel.data.availableStorage;
  462. [self setDataToBottomViewFun];
  463. }
  464. @end