uploadImageOrVideoViewController.m 19 KB

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