NASViewController.m 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125
  1. //
  2. // NASViewController.m
  3. // Private-X
  4. //
  5. // Created by xd h on 2024/6/19.
  6. //
  7. #import "NASViewController.h"
  8. #import "NASMySpaceView.h"
  9. #import "NASCommonUsedView.h"
  10. #import "shareSecretTableViewCell.h"
  11. #import "NASLastFileView.h"
  12. #import "previewImageOrVideoViewController.h"
  13. #import "previewAudioOrDocumentViewController.h"
  14. #import "previewFileAndFolderViewController.h"
  15. #import "shareRecordViewController.h"
  16. #import "backupsOptionViewController.h"
  17. #import "fileTransfeSetViewController.h"
  18. #import "uploadFileRecordViewController.h"
  19. #import "previewToUploadFileView.h"
  20. #import "NASMySpaceViewController.h"
  21. #import "NasPreviewVideoViewController.h"
  22. #import "lastFileManager.h"
  23. #import "lastFileTableViewCell.h"
  24. #import "nasLastFileViewController.h"
  25. #import "audioPlayerViewController.h"
  26. #import "videoPlayByAVPlayerViewController.h"
  27. #import "imageDetailsScrollViewController.h"
  28. #import "queryShareModel.h"
  29. #import "imageVersionRenewTipView.h"
  30. #import "HWVersionModel.h"
  31. #import "HaveNewVersionView.h"
  32. #import "newerGuideView.h"
  33. #import "CustomerWebViewController.h"
  34. #import "noticeModel.h"
  35. #import "HaveNoticeView.h"
  36. #import "audioPlayingView.h"
  37. #import "DFPlayer.h"
  38. #import "queryShareReportMarkModel.h"
  39. #import "UpgradeInfoModel.h"
  40. #import "imageVersionUpdateDoneView.h"
  41. #import "imageVersionUpdateFailView.h"
  42. #import "queryHeartbeatModel.h"
  43. #import "BoxHeartbeatAlertTool.h"
  44. #import "DocumentPickerManager.h"
  45. @interface NASViewController ()<UITableViewDelegate,UITableViewDataSource>
  46. {
  47. BOOL canShareType;
  48. UIImageView *welcomeImageV;//弃用
  49. UIView* rightRedView;//
  50. BOOL hadUploadTaskType;
  51. BOOL hadDownloadTaskType;
  52. NSInteger tryLinkNum;
  53. NSInteger tryLinkFrpNum;//frp接口连接次数
  54. imageVersionRenewTipView * RenewTipView;
  55. imageVersionUpdateDoneView* imageVersionUpdateDoneV;
  56. imageVersionUpdateFailView* imageVersionUpdateFailV;
  57. }
  58. @property (nonatomic,strong)UITableView*tableView;
  59. @property (nonatomic, strong) UIView*tableHeadView;
  60. @property (nonatomic, strong) NASMySpaceView* NASMySpaceV;
  61. @property (nonatomic, strong) NASCommonUsedView* NASCommonUsedV;
  62. @property (nonatomic,strong)NASLastFileView*NASLastFileV;
  63. @property (nonatomic,strong) NSMutableArray *lastFileDataArr;
  64. @property (nonatomic,strong)UpgradeInfoModel*otaUpgradeInfoModel;
  65. @end
  66. @implementation NASViewController
  67. - (void)viewDidLoad {
  68. [super viewDidLoad];
  69. // Do any additional setup after loading the view.
  70. [self.view setBackgroundColor:HWF5F7FAColor];
  71. [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(getExtraFilesDoneFun:) name:getExtraFilesDoneNotification object:nil];
  72. [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationDidBecomeActive:) name:UIApplicationDidBecomeActiveNotification object:nil];
  73. //输入密码完成
  74. [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didInpuPwdOkFun) name:didInputPWDNotification object:nil];
  75. [self.toolBar setHidden:YES];
  76. [self.navigationBar setHidden:YES];
  77. [self.navBarBGView setHidden:YES];
  78. [self drawAnyView];
  79. // CGFloat second = 0.1;
  80. // BOOL haveOpenMask = [HWDataManager getBoolWithKey:Const_cloudPhone_Model_Open];
  81. // if(haveOpenMask){
  82. // second = 5;
  83. // }
  84. // dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(second * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
  85. // [self beginShowAlertFun];
  86. // });
  87. //[self beginShowAlertFun];
  88. }
  89. - (void)drawAnyView{
  90. //顶底底部图片
  91. UIImageView *topImageV = [UIImageView new];
  92. topImageV.image = [UIImage imageNamed:@"Nas_top_img"];
  93. [self.view addSubview:topImageV];
  94. [topImageV mas_makeConstraints:^(MASConstraintMaker *make) {
  95. make.top.mas_equalTo(0);
  96. make.left.mas_equalTo(0);
  97. make.right.mas_equalTo(0);
  98. make.height.mas_equalTo(280.0*AUTOSCALE);
  99. }];
  100. // NSString *welcomeImageStr = @"nas_welcome_cs";
  101. // //欢迎
  102. // //en-US 英文 ja-JP 日文
  103. // NSArray *arLanguages = [[NSUserDefaults standardUserDefaults] objectForKey:@"AppleLanguages"];
  104. // NSLog(@"arLanguages:%@",arLanguages);
  105. // ///获取设备当前地区的代码和APP语言环境
  106. // NSString *languageCode = [NSLocale preferredLanguages][0];
  107. //
  108. // //目前支持 中文(简体 繁体) 英文 日语
  109. // if([languageCode rangeOfString:@"zh-Hans"].location != NSNotFound)
  110. // {
  111. // welcomeImageStr = @"nas_welcome_cs";
  112. // }
  113. // else if([languageCode rangeOfString:@"zh-Hant"].location != NSNotFound)
  114. // {
  115. // welcomeImageStr = @"nas_welcome_ct";
  116. // }
  117. // else{
  118. // welcomeImageStr = @"nas_welcome_en";
  119. // }
  120. CGFloat imageTopY = 54.0;
  121. welcomeImageV = [UIImageView new];
  122. welcomeImageV.hidden = YES;
  123. //welcomeImageV.image = [UIImage imageNamed:welcomeImageStr];
  124. [self.view addSubview:welcomeImageV];
  125. [welcomeImageV mas_makeConstraints:^(MASConstraintMaker *make) {
  126. make.top.mas_equalTo(imageTopY);
  127. make.left.mas_equalTo(16);
  128. make.width.mas_equalTo(210);
  129. make.height.mas_equalTo(24);
  130. }];
  131. UILabel *welcomelabel = [[UILabel alloc] init];
  132. welcomelabel.text = NSLocalizedString(@"NAS_top_welcome_title",nil);
  133. welcomelabel.textColor = [UIColor hwColor:@"#0A132B"];
  134. welcomelabel.font = [UIFont boldSystemFontOfSize:18.0];
  135. [self.view addSubview:welcomelabel];
  136. [welcomelabel mas_makeConstraints:^(MASConstraintMaker *make) {
  137. make.top.mas_equalTo(imageTopY);
  138. make.left.mas_equalTo(16);
  139. make.width.mas_equalTo(240);
  140. make.height.mas_equalTo(24);
  141. }];
  142. //添加按钮
  143. UIButton *addButton = [[UIButton alloc] init];
  144. [addButton setImage:[UIImage imageNamed:@"nas_add_icon"] forState:UIControlStateNormal];
  145. addButton.tag = 1;
  146. [addButton addTarget:self action:@selector(didClickHeadButtonFun:) forControlEvents:UIControlEventTouchUpInside];
  147. [self.view addSubview:addButton];
  148. [addButton mas_makeConstraints:^(MASConstraintMaker *make) {
  149. make.centerY.equalTo(welcomeImageV.mas_centerY).offset(0);
  150. make.right.mas_equalTo(-10);
  151. make.width.mas_equalTo(40);
  152. make.height.mas_equalTo(40);
  153. }];
  154. UIButton *rightTransferListButton = [[UIButton alloc] init];
  155. //[rightTransferListButton setImage:[UIImage imageNamed:@"icon_file_transfer"] forState:UIControlStateNormal];
  156. [rightTransferListButton setImage:[UIImage imageNamed:@"icon_file_transfer"] forState:UIControlStateNormal];
  157. rightTransferListButton.tag = 2;
  158. [rightTransferListButton addTarget:self action:@selector(didClickHeadButtonFun:) forControlEvents:UIControlEventTouchUpInside];
  159. [self.view addSubview:rightTransferListButton];
  160. [rightTransferListButton mas_makeConstraints:^(MASConstraintMaker *make) {
  161. //make.top.mas_equalTo(imageTopY);
  162. make.centerY.equalTo(welcomeImageV.mas_centerY).offset(0);
  163. make.right.equalTo(addButton.mas_left).offset(0);
  164. make.width.mas_equalTo(40);
  165. make.height.mas_equalTo(40);
  166. }];
  167. rightRedView = [[UIView alloc] init];
  168. rightRedView.backgroundColor = [UIColor hwColor:@"#DD4E4E" alpha:1.0];
  169. [rightTransferListButton addSubview:rightRedView];
  170. rightRedView.layer.cornerRadius = 7;
  171. rightRedView.hidden = YES;
  172. [rightRedView mas_makeConstraints:^(MASConstraintMaker *make) {
  173. make.width.mas_equalTo(14);
  174. make.height.mas_equalTo(14);
  175. make.right.mas_equalTo(0);
  176. make.top.mas_equalTo(6);
  177. }];
  178. [self.view addSubview:self.tableView];
  179. [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
  180. make.left.mas_equalTo(0);
  181. make.right.mas_equalTo(0);
  182. make.top.equalTo(welcomeImageV.mas_bottom).offset(20);
  183. make.bottom.mas_equalTo(-TABBARHEIGHT);
  184. }];
  185. //self.tableView.userInteractionEnabled = NO;
  186. _tableHeadView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_W, 165+ 15 +120 +54 + 15)];
  187. //_tableHeadView.backgroundColor = [UIColor hwColor:@"#F6F8FA"];
  188. _tableHeadView.backgroundColor = [UIColor clearColor];
  189. self.tableView.tableHeaderView = _tableHeadView;
  190. //我的空间
  191. _NASMySpaceV = [[NASMySpaceView alloc] init];
  192. [_tableHeadView addSubview:_NASMySpaceV];
  193. [_NASMySpaceV mas_makeConstraints:^(MASConstraintMaker *make) {
  194. //make.top.equalTo(welcomeImageV.mas_bottom).offset(20);
  195. make.top.mas_equalTo(0);
  196. make.left.mas_equalTo(0);
  197. make.right.mas_equalTo(0);
  198. make.height.mas_equalTo(165);
  199. }];
  200. //常用功能
  201. _NASCommonUsedV = [[NASCommonUsedView alloc] init];
  202. [_tableHeadView addSubview:_NASCommonUsedV];
  203. [_NASCommonUsedV mas_makeConstraints:^(MASConstraintMaker *make) {
  204. make.top.equalTo(_NASMySpaceV.mas_bottom).offset(15);
  205. make.left.mas_equalTo(0);
  206. make.right.mas_equalTo(0);
  207. make.height.mas_equalTo(120);
  208. }];
  209. //最近文件
  210. [_tableHeadView addSubview:self.NASLastFileV];
  211. [self.NASLastFileV mas_makeConstraints:^(MASConstraintMaker *make) {
  212. make.top.equalTo(_NASCommonUsedV.mas_bottom).offset(15);
  213. make.left.mas_equalTo(0);
  214. make.right.mas_equalTo(0);
  215. make.height.mas_equalTo(54);
  216. }];
  217. BOOL isShowLastFileType = [HWDataManager getBoolWithKey:Const_last_file_show];
  218. self.NASLastFileV.eyeButton.selected = !isShowLastFileType;
  219. //tableFooterView
  220. NSString *text = NSLocalizedString(@"NAS_bottom_tip",nil);
  221. UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, SCREEN_W, 50)];
  222. label.text = [[NSString alloc] initWithFormat:@"- %@ -",text];
  223. label.textColor = [UIColor hwColor:@"#959799"];
  224. label.font = [UIFont systemFontOfSize:12];
  225. label.textAlignment = NSTextAlignmentCenter;
  226. self.tableView.tableFooterView = label;
  227. KWeakSelf
  228. _NASMySpaceV.didClickButtonFun = ^(NSInteger tag) {
  229. [weakSelf didClickMySpaceFunBy:tag];
  230. };
  231. _NASCommonUsedV.didClickButtonFun = ^(NSInteger tag) {
  232. [weakSelf didClickCommonUsedFunBy:tag];
  233. };
  234. self.NASLastFileV.didClickButtonFun = ^(NSInteger tag) {
  235. [weakSelf didClickLastFileFunBy:tag];
  236. };
  237. [self setMySpaceDataFun];
  238. }
  239. #pragma mark - 懒加载
  240. - (UITableView *)tableView{
  241. if (!_tableView) {
  242. _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, 0, 0) style:UITableViewStylePlain];
  243. _tableView.delegate = self;
  244. _tableView.dataSource = self;
  245. _tableView.showsVerticalScrollIndicator = NO;
  246. _tableView.showsHorizontalScrollIndicator = NO;
  247. // _tableView.contentInset = UIEdgeInsetsMake(-H_STATE_BAR, 0, 0, 0);
  248. [_tableView setSeparatorStyle:(UITableViewCellSeparatorStyleNone)];
  249. [_tableView setSeparatorColor:[UIColor clearColor]];
  250. //[_tableView setBackgroundColor:[UIColor hwColor:@"#FFFFFF"]];
  251. [_tableView setBackgroundColor:[UIColor clearColor]];
  252. //[_tableView setTableFooterView:[UIView new]];
  253. [_tableView setBounces:YES];
  254. if (@available(iOS 15.0, *)) {
  255. _tableView.sectionHeaderTopPadding = 0;
  256. }
  257. _tableView.layer.cornerRadius = 8;
  258. _tableView.layer.masksToBounds = YES;
  259. }
  260. return _tableView;
  261. }
  262. - (NASLastFileView*)NASLastFileV
  263. {
  264. if(!_NASLastFileV){
  265. _NASLastFileV = [NASLastFileView new];
  266. }
  267. return _NASLastFileV;
  268. }
  269. #pragma mark - 列表委托
  270. - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
  271. return 1;
  272. }
  273. - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
  274. if(!_lastFileDataArr){
  275. return 0;
  276. }
  277. return _lastFileDataArr.count;
  278. }
  279. - (lastFileTableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
  280. __block NSInteger row = indexPath.row;
  281. static NSString *identifier = @"lastFileTableViewCell";
  282. lastFileTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:identifier];
  283. cell.selectionStyle = UITableViewCellSelectionStyleNone;
  284. if (!cell){
  285. cell = [[lastFileTableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:identifier];
  286. [cell setSelectionStyle:UITableViewCellSelectionStyleNone];
  287. [cell setBackgroundColor:[UIColor clearColor]];
  288. [cell setAccessoryType:(UITableViewCellAccessoryNone)];
  289. [cell hideCheckButtonBy:YES];
  290. }
  291. if(row < _lastFileDataArr.count){
  292. lastFileModel* dataModel = _lastFileDataArr[row];
  293. cell.curLastFileModel = dataModel;
  294. // KWeakSelf
  295. // cell.didClickSwitch = ^(BOOL SwitchOn) {
  296. // //[weakSelf userCheckFilePreviewByRow:row];
  297. // };
  298. cell.cellBgView.layer.mask = nil;
  299. if(row == _lastFileDataArr.count -1){
  300. /*下圆角*/
  301. UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(0, 0, SCREEN_W-32 , 84)
  302. byRoundingCorners:UIRectCornerBottomLeft | UIRectCornerBottomRight
  303. cornerRadii:CGSizeMake(12, 12)];
  304. CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];
  305. maskLayer.frame = cell.cellBgView.bounds;
  306. maskLayer.path = maskPath.CGPath;
  307. cell.cellBgView.layer.mask = maskLayer;
  308. }
  309. }
  310. return cell;
  311. }
  312. - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
  313. return 84;
  314. }
  315. - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
  316. {
  317. NSInteger row = indexPath.row;
  318. if(row < _lastFileDataArr.count){
  319. lastFileModel* dataModel = _lastFileDataArr[row];
  320. if([dataModel.type isEqualToString:@"video"]){
  321. videoPlayByAVPlayerViewController *vc = [videoPlayByAVPlayerViewController new];
  322. vc.VideoDataMode = (NASFileAndFolderDataModel*)dataModel;
  323. [self.navigationController pushViewController:vc animated:YES];
  324. }
  325. else if([dataModel.type isEqualToString:@"audio"]){
  326. // NSMutableArray *audioDataArr = [NSMutableArray new];
  327. // NSInteger index = 0;
  328. //
  329. // for (int i=0; i<_lastFileDataArr.count; i++) {
  330. // lastFileModel* audioDataModel = _lastFileDataArr[i];
  331. // if([audioDataModel.type isEqualToString:@"audio"]){
  332. //
  333. // if(i == row){
  334. // index = audioDataArr.count;
  335. // }
  336. //
  337. // [audioDataArr addObject:audioDataModel];
  338. // }
  339. // }
  340. audioPlayerViewController *vc = [audioPlayerViewController new];
  341. vc.isfirstEnterType = YES;
  342. vc.outSideDataModel = (NASFileAudioDataModel *)dataModel;
  343. [self.navigationController pushViewController:vc animated:YES];
  344. KWeakSelf
  345. vc.didNeedDeleteFile = ^(NSString * _Nonnull filePath) {
  346. [weakSelf getLastFileDataFun];
  347. };
  348. }
  349. else if([dataModel.type containsString:@"jpg"]){
  350. NSMutableArray *jpgDataArr = [NSMutableArray new];
  351. NSInteger index = 0;
  352. for (int i=0; i<_lastFileDataArr.count; i++) {
  353. lastFileModel* jpgDataModel = _lastFileDataArr[i];
  354. if([jpgDataModel.type containsString:@"jpg"]){
  355. if(i == row){
  356. index = jpgDataArr.count;
  357. }
  358. [jpgDataArr addObject:jpgDataModel];
  359. }
  360. }
  361. imageDetailsScrollViewController *vc = [imageDetailsScrollViewController new];
  362. vc.index = index;
  363. vc.totalDataArr = jpgDataArr;
  364. [self.navigationController pushViewController:vc animated:YES];
  365. vc.canShareType = canShareType;
  366. }
  367. }
  368. }
  369. #pragma mark 点击头部
  370. - (void)didClickHeadButtonFun:(UIButton*)but
  371. {
  372. if([AFNetworkReachabilityManager sharedManager].networkReachabilityStatus == AFNetworkReachabilityStatusNotReachable)
  373. {
  374. [[iToast makeText:NSLocalizedString(@"phone_network_fail_Tips",nil)] show];
  375. return;
  376. }
  377. NSInteger tag = but.tag;
  378. switch (tag) {
  379. case 1:
  380. {
  381. if(ksharedAppDelegate.DisabledFileTransferType){
  382. if(ksharedAppDelegate.isImageNewFor130){
  383. [[iToast makeText:NSLocalizedString(@"File_Transfer_Disable_tip",nil)] show];
  384. }
  385. else{
  386. [[iToast makeText:NSLocalizedString(@"File_Transfer_Disable_tip2",nil)] show];
  387. }
  388. return;
  389. }
  390. [self userDidClickUploadViewFun];
  391. }
  392. break;
  393. case 2:
  394. {
  395. uploadFileRecordViewController *vc = [uploadFileRecordViewController new];
  396. [self pushViewController:vc animated:YES];
  397. }
  398. break;
  399. default:
  400. break;
  401. }
  402. }
  403. #pragma mark 点击我的空间模块
  404. - (void)didClickMySpaceFunBy:(NSInteger)tag
  405. {
  406. // if(tag ==1 ){
  407. // if(!ksharedAppDelegate.cloudPhoneExtraFileListMod){
  408. // //链接了
  409. // tryLinkNum ++;
  410. // [[webSocketManager shareInstance] getExtraFilesListFun];
  411. //
  412. // if(tryLinkNum >= 3){
  413. // tryLinkNum = 0;
  414. // [[iToast makeText:NSLocalizedString(@"box_link_error_show_tip",nil)] show];
  415. // return;
  416. // }
  417. //
  418. // KWeakSelf
  419. // dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
  420. // [weakSelf didClickMySpaceFunBy:tag];
  421. // });
  422. // return;
  423. // }
  424. // }
  425. if([AFNetworkReachabilityManager sharedManager].networkReachabilityStatus == AFNetworkReachabilityStatusNotReachable)
  426. {
  427. [[iToast makeText:NSLocalizedString(@"phone_network_fail_Tips",nil)] show];
  428. return;
  429. }
  430. // if (!ksharedAppDelegate.isWebSockLinkOKAginType) {//未链接
  431. // [[iToast makeText:NSLocalizedString(@"box_link_error_show_tip",nil)] show];
  432. // return;
  433. // }
  434. if(ksharedAppDelegate.DisabledFileTransferType){
  435. if(ksharedAppDelegate.isImageNewFor130){
  436. [[iToast makeText:NSLocalizedString(@"File_Transfer_Disable_tip",nil)] show];
  437. }
  438. else{
  439. [[iToast makeText:NSLocalizedString(@"File_Transfer_Disable_tip2",nil)] show];
  440. }
  441. return;
  442. }
  443. tryLinkNum = 0;
  444. switch (tag)
  445. {
  446. case 1:
  447. {
  448. NASMySpaceViewController *vc = [NASMySpaceViewController new];
  449. [self pushViewController:vc animated:YES];
  450. }
  451. break;
  452. case 10:{
  453. previewImageOrVideoViewController *vc = [previewImageOrVideoViewController new];
  454. vc.isPhotoType = YES;
  455. [self pushViewController:vc animated:YES];
  456. }
  457. break;
  458. case 11:{
  459. // previewImageOrVideoViewController *vc = [previewImageOrVideoViewController new];
  460. // vc.isPhotoType = NO;
  461. // [self pushViewController:vc animated:YES];
  462. NasPreviewVideoViewController *vc = [NasPreviewVideoViewController new];
  463. [self pushViewController:vc animated:YES];
  464. }
  465. break;
  466. case 12:{
  467. previewAudioOrDocumentViewController *vc = [previewAudioOrDocumentViewController new];
  468. vc.isAudioType = YES;
  469. [self pushViewController:vc animated:YES];
  470. }
  471. break;
  472. case 13:{
  473. previewFileAndFolderViewController *vc = [previewFileAndFolderViewController new];
  474. [self pushViewController:vc animated:YES];
  475. }
  476. break;
  477. default:
  478. break;
  479. }
  480. }
  481. #pragma mark 点击常用模块模块
  482. - (void)didClickCommonUsedFunBy:(NSInteger)tag
  483. {
  484. if([AFNetworkReachabilityManager sharedManager].networkReachabilityStatus == AFNetworkReachabilityStatusNotReachable)
  485. {
  486. [[iToast makeText:NSLocalizedString(@"phone_network_fail_Tips",nil)] show];
  487. return;
  488. }
  489. // if (!ksharedAppDelegate.isWebSockLinkOKAginType) {//未链接
  490. // [[iToast makeText:NSLocalizedString(@"box_link_error_show_tip",nil)] show];
  491. // return;
  492. // }
  493. switch (tag)
  494. {
  495. case 10:{
  496. backupsOptionViewController *vc = [backupsOptionViewController new];
  497. [self pushViewController:vc animated:YES];
  498. }
  499. break;
  500. case 11:
  501. {
  502. // if(!ksharedAppDelegate.isWebSockLinkOKAginType){
  503. // [[iToast makeText:NSLocalizedString(@"check_could_phone_state",nil)] show];
  504. // return;
  505. // }
  506. fileTransfeSetViewController *nextVC = [fileTransfeSetViewController new];
  507. [self pushViewController:nextVC animated:YES];
  508. }
  509. break;
  510. case 12:{
  511. shareRecordViewController *vc = [shareRecordViewController new];
  512. [self pushViewController:vc animated:YES];
  513. [self.NASCommonUsedV setRedPointShow:NO];
  514. [self updateShareBeMarkFun];
  515. }
  516. break;
  517. default:
  518. break;
  519. }
  520. }
  521. #pragma mark 点击最近文件模块
  522. - (void)didClickLastFileFunBy:(NSInteger)tag
  523. {
  524. if(tag == 2){
  525. [self getLastFileDataFun];
  526. }
  527. else if (tag ==1){
  528. nasLastFileViewController *vc = [nasLastFileViewController new];
  529. [self pushViewController:vc animated:YES];
  530. }
  531. }
  532. #pragma mark 用户点击上传文件
  533. - (void)userDidClickUploadViewFun
  534. {
  535. [self hideTabbarFun];
  536. previewToUploadFileView *previewToUploadFileV = [[previewToUploadFileView alloc] init];
  537. [self.view addSubview:previewToUploadFileV];
  538. [previewToUploadFileV mas_makeConstraints:^(MASConstraintMaker *make) {
  539. make.left.mas_equalTo(0);
  540. make.right.mas_equalTo(0);
  541. make.bottom.mas_equalTo(10);
  542. make.top.mas_equalTo(0);
  543. }];
  544. KWeakSelf
  545. previewToUploadFileV.didClickButtonFun = ^(NSInteger tag) {
  546. [weakSelf gotoUploadFileFunWith:tag];
  547. };
  548. previewToUploadFileV.didClickCloseFun = ^{
  549. [weakSelf showTabbarFun];
  550. };
  551. }
  552. #pragma mark 调整文件上传
  553. - (void)gotoUploadFileFunWith:(NSInteger)tag
  554. {
  555. if(tag == 10 || tag == 11){
  556. uploadImageOrVideoViewController *vc = [uploadImageOrVideoViewController new];
  557. if(tag ==10){
  558. vc.isPhotoType = YES;
  559. }
  560. else{
  561. vc.isPhotoType = NO;
  562. }
  563. [self pushViewController:vc animated:YES];
  564. }
  565. else{
  566. KWeakSelf
  567. [[DocumentPickerManager shareManager] openDocumentPickerSuccess:^(NSArray * _Nonnull urls) {
  568. [weakSelf gotoUploadFileRecordByFileAppWithUrls:urls];
  569. }];
  570. }
  571. }
  572. #pragma mark 获取到云机磁盘相关信息
  573. - (void)getExtraFilesDoneFun:(NSNotification*)not
  574. {
  575. // mainBlock(^{
  576. // [self setMySpaceDataFun];
  577. // });
  578. [self getExtraFilesByFrpHttpFun];
  579. }
  580. #pragma mark 走frp方案 获取云机磁盘信息
  581. - (void)getExtraFilesByFrpHttpFun
  582. {
  583. NSMutableDictionary*paraDict = [NSMutableDictionary new];
  584. KWeakSelf
  585. [[netWorkManager shareInstance] cloudPhoneGETCallBackCode:@"getExtra" Parameters:paraDict success:^(id _Nonnull responseObject) {
  586. cloudPhoneExtraFileListModel *model = [[cloudPhoneExtraFileListModel alloc] initWithDictionary:responseObject error:nil];
  587. if(model && model.status == 0){
  588. ksharedAppDelegate.cloudPhoneExtraFileListMod = model;
  589. [weakSelf setMySpaceDataFun];
  590. }
  591. } failure:^(NSError * _Nonnull error) {
  592. [weakSelf setMySpaceDataFun];
  593. }];
  594. }
  595. #pragma mark 设置我的空间信息
  596. - (void)setMySpaceDataFun
  597. {
  598. if(ksharedAppDelegate.cloudPhoneExtraFileListMod){
  599. tryLinkFrpNum = 0;
  600. [_NASMySpaceV setProgressFun];
  601. }
  602. else{
  603. // tryLinkFrpNum ++;
  604. //
  605. // if(tryLinkFrpNum == 3){
  606. // tryLinkFrpNum = 0;
  607. // [self checkBoxHeartbeatFun];
  608. // }
  609. dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
  610. //[self setMySpaceDataFun];
  611. [self getExtraFilesByFrpHttpFun];
  612. });
  613. }
  614. }
  615. - (void)viewWillAppear:(BOOL)animated{
  616. [super viewWillAppear:animated];
  617. [self getLastFileDataFun];
  618. [self queryShareSwitchFunFun];
  619. [self queryShareBeMarkFun];
  620. dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
  621. [self checkFileTransferTask];
  622. });
  623. //[self beginShowAlertFun];
  624. [self handelAudioPlayingViewFun];
  625. [self showTabbarFun];
  626. //尝试修复偶现获取不到磁盘空间问题
  627. [self getExtraFilesByFrpHttpFun];
  628. }
  629. - (void)viewWillDisappear:(BOOL)animated{
  630. [super viewWillDisappear:animated];
  631. }
  632. - (void)pushViewController:(UIViewController*)vc animated:(BOOL)animated
  633. {
  634. [self.navigationController pushViewController:vc animated:animated];
  635. //[self hideTabbarFun];
  636. }
  637. - (void)showTabbarFun
  638. {
  639. // 显示 tab bar
  640. self.tabBarController.tabBar.hidden = NO;
  641. }
  642. - (void)hideTabbarFun
  643. {
  644. // 隐藏 tab bar
  645. self.tabBarController.tabBar.hidden = YES;
  646. }
  647. #pragma mark 获取最近文件数据
  648. - (void)getLastFileDataFun
  649. {
  650. _lastFileDataArr = [lastFileManager shareManager].lastFileListArr;
  651. //HLog(@"%@",_lastFileDataArr);
  652. BOOL isShowLastFileType = [HWDataManager getBoolWithKey:Const_last_file_show];
  653. if(!isShowLastFileType){
  654. _tableHeadView.frame = CGRectMake(0, 0, SCREEN_W, 165+ 15 +120 +54 + 15);
  655. [self.NASLastFileV mas_remakeConstraints:^(MASConstraintMaker *make) {
  656. make.top.equalTo(_NASCommonUsedV.mas_bottom).offset(15);
  657. make.left.mas_equalTo(0);
  658. make.right.mas_equalTo(0);
  659. make.height.mas_equalTo(54);
  660. }];
  661. self.NASLastFileV.notDataImageV.hidden = YES;
  662. self.NASLastFileV.notDataLabel.hidden = YES;
  663. //全圆角
  664. UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(0, 0, SCREEN_W-32 , 54)
  665. byRoundingCorners:UIRectCornerAllCorners
  666. cornerRadii:CGSizeMake(12, 12)];
  667. CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];
  668. maskLayer.frame = self.NASLastFileV.bounds;
  669. maskLayer.path = maskPath.CGPath;
  670. self.NASLastFileV.whiteBgView.layer.mask = nil;
  671. self.NASLastFileV.whiteBgView.layer.mask = maskLayer;
  672. _lastFileDataArr = [NSMutableArray new];
  673. }
  674. else if(_lastFileDataArr.count > 0){
  675. _tableHeadView.frame = CGRectMake(0, 0, SCREEN_W, 165+ 15 +120 +54 + 15);
  676. [self.NASLastFileV mas_remakeConstraints:^(MASConstraintMaker *make) {
  677. make.top.equalTo(_NASCommonUsedV.mas_bottom).offset(15);
  678. make.left.mas_equalTo(0);
  679. make.right.mas_equalTo(0);
  680. make.height.mas_equalTo(54);
  681. }];
  682. self.NASLastFileV.notDataImageV.hidden = YES;
  683. self.NASLastFileV.notDataLabel.hidden = YES;
  684. /*上圆角*/
  685. UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(0, 0, SCREEN_W- 32 , 54)
  686. byRoundingCorners:UIRectCornerTopLeft|UIRectCornerTopRight
  687. cornerRadii:CGSizeMake(12, 12)];
  688. CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];
  689. maskLayer.frame = CGRectMake(0, 0, SCREEN_W -32, 54);
  690. maskLayer.path = maskPath.CGPath;
  691. self.NASLastFileV.whiteBgView.layer.mask = nil;
  692. self.NASLastFileV.whiteBgView.layer.mask = maskLayer;
  693. }
  694. else{
  695. _tableHeadView.frame = CGRectMake(0, 0, SCREEN_W, 165+ 15 +120 +254 + 15);
  696. [self.NASLastFileV mas_remakeConstraints:^(MASConstraintMaker *make) {
  697. make.top.equalTo(_NASCommonUsedV.mas_bottom).offset(15);
  698. make.left.mas_equalTo(0);
  699. make.right.mas_equalTo(0);
  700. make.height.mas_equalTo(254);
  701. }];
  702. self.NASLastFileV.notDataImageV.hidden = NO;
  703. self.NASLastFileV.notDataLabel.hidden = NO;
  704. //全圆角
  705. UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(0, 0, SCREEN_W-32 , 254)
  706. byRoundingCorners:UIRectCornerAllCorners
  707. cornerRadii:CGSizeMake(12, 12)];
  708. CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];
  709. maskLayer.frame = self.NASLastFileV.bounds;
  710. maskLayer.path = maskPath.CGPath;
  711. self.NASLastFileV.whiteBgView.layer.mask = nil;
  712. self.NASLastFileV.whiteBgView.layer.mask = maskLayer;
  713. }
  714. KWeakSelf
  715. dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
  716. [weakSelf.tableView reloadData];
  717. });
  718. }
  719. #pragma mark 获取分享开关
  720. -(void)queryShareSwitchFunFun
  721. {
  722. NSMutableDictionary *paraDict = [NSMutableDictionary new];
  723. [paraDict setValue:@7 forKey:@"type"];
  724. //KWeakSelf
  725. [[netWorkManager shareInstance] CommonGetWithCallBackCode:queryShareSwitchFun Parameters:paraDict success:^(id _Nonnull responseObject){
  726. queryShareModel *queryShareMod = [[queryShareModel alloc] initWithDictionary:responseObject error:nil];
  727. if(queryShareMod){
  728. self->canShareType = queryShareMod.data.configValue;
  729. //[weakSelf.curEditTypeBottomView setCanShaewFunBy:queryShareMod.data.configValue];
  730. }
  731. } failure:^(NSError * _Nonnull error) {
  732. }];
  733. }
  734. - (void)checkFileTransferTask
  735. {//有个偶现的闪退在BGFMDB
  736. [[nasUploadFileManager shareInstance] checkHadUploadTaskWithComplete:^(BOOL isSuccess) {
  737. self->hadUploadTaskType = isSuccess;
  738. [self setRightButtonRedTypeFun];
  739. }];
  740. KWeakSelf
  741. dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
  742. [[nasDownloadFileManager shareInstance] checkHadDownloadTaskWithComplete:^(BOOL isSuccess) {
  743. self->hadDownloadTaskType = isSuccess;
  744. [weakSelf setRightButtonRedTypeFun];
  745. }];
  746. });
  747. }
  748. - (void)setRightButtonRedTypeFun
  749. {
  750. mainBlock(^{
  751. if(self->hadUploadTaskType || self->hadDownloadTaskType){
  752. self->rightRedView.hidden = NO;
  753. }
  754. else{
  755. self->rightRedView.hidden = YES;
  756. }
  757. });
  758. }
  759. #pragma mark 是否有新的分享被封禁
  760. -(void)queryShareBeMarkFun
  761. {
  762. NSMutableDictionary *paraDict = [NSMutableDictionary new];
  763. KWeakSelf
  764. [[netWorkManager shareInstance] CommonGetWithCallBackCode:queryShareReportMarkFun Parameters:paraDict success:^(id _Nonnull responseObject){
  765. queryShareReportMarkModel *ShareMarkMod = [[queryShareReportMarkModel alloc] initWithDictionary:responseObject error:nil];
  766. if(ShareMarkMod){
  767. [weakSelf.NASCommonUsedV setRedPointShow:ShareMarkMod.data.reportMark];
  768. }
  769. } failure:^(NSError * _Nonnull error) {
  770. }];
  771. }
  772. #pragma mark 修改分享被封禁的mark状态()
  773. -(void)updateShareBeMarkFun
  774. {
  775. NSMutableDictionary *paraDict = [NSMutableDictionary new];
  776. //KWeakSelf
  777. [[netWorkManager shareInstance] CommonPostCallBackCode:updateShareReportMarkFun Parameters:paraDict success:^(id _Nonnull responseObject){
  778. // SuperModel *ShareMarkMod = [[SuperModel alloc] initWithDictionary:responseObject error:nil];
  779. // if(ShareMarkMod){
  780. //
  781. // }
  782. } failure:^(NSError * _Nonnull error) {
  783. }];
  784. }
  785. #pragma mark 处理音频播放中的视图状态
  786. - (void)handelAudioPlayingViewFun
  787. {
  788. audioPlayingView * audioPlayingV = [audioPlayingView sharedInstance];
  789. if([DFPlayer sharedPlayer].state == DFPlayerStateBuffering
  790. ||[DFPlayer sharedPlayer].state == DFPlayerStatePlaying
  791. ||[DFPlayer sharedPlayer].state == DFPlayerStatePause){//播放中
  792. [self showAudioPlayingViewFun];
  793. }
  794. else{
  795. [self hideAudioPlayingViewFun];
  796. }
  797. KWeakSelf
  798. audioPlayingV.didClickButtonFun = ^(NSInteger tag) {
  799. if(tag == 1){
  800. [weakSelf hideAudioPlayingViewFun];
  801. }
  802. else if(tag == 5){
  803. [weakSelf AudioPlayingGotoAudioPlayerVCFun];
  804. }
  805. };
  806. }
  807. - (void)AudioPlayingGotoAudioPlayerVCFun{
  808. audioPlayerViewController *vc = [audioPlayerViewController new];
  809. vc.isfirstEnterType = NO;
  810. [self.navigationController pushViewController:vc animated:YES];
  811. }
  812. #pragma mark 显示音频播放中的视图
  813. - (void)showAudioPlayingViewFun
  814. {
  815. audioPlayingView * audioPlayingV = [audioPlayingView sharedInstance];
  816. [self.view addSubview:audioPlayingV];
  817. if([DFPlayer sharedPlayer].state == DFPlayerStatePlaying){
  818. [audioPlayingV startRotatingImage];
  819. }
  820. else if ([DFPlayer sharedPlayer].state == DFPlayerStatePause){
  821. [audioPlayingV stopRotatingImage];
  822. }
  823. [audioPlayingV mas_makeConstraints:^(MASConstraintMaker *make) {
  824. make.height.mas_equalTo(49);
  825. make.left.mas_equalTo(0);
  826. make.right.mas_equalTo(0);
  827. make.bottom.mas_equalTo(-TABBARHEIGHT);
  828. }];
  829. [self.tableView mas_remakeConstraints:^(MASConstraintMaker *make) {
  830. make.left.mas_equalTo(0);
  831. make.right.mas_equalTo(0);
  832. make.top.equalTo(welcomeImageV.mas_bottom).offset(20);
  833. make.bottom.mas_equalTo(-TABBARHEIGHT -49);
  834. }];
  835. }
  836. #pragma mark 隐藏音频播放中的视图
  837. - (void)hideAudioPlayingViewFun
  838. {
  839. // audioPlayingView * audioPlayingV = [audioPlayingView sharedInstance];
  840. // [audioPlayingV removeFromSuperview];
  841. [self.tableView mas_remakeConstraints:^(MASConstraintMaker *make) {
  842. make.left.mas_equalTo(0);
  843. make.right.mas_equalTo(0);
  844. make.top.equalTo(welcomeImageV.mas_bottom).offset(20);
  845. make.bottom.mas_equalTo(-TABBARHEIGHT);
  846. }];
  847. }
  848. - (void)applicationDidBecomeActive:(NSNotification *)notification
  849. {
  850. //[self beginShowAlertFun];
  851. //后台回来点击首页无效问题
  852. //self.tableView.userInteractionEnabled = YES;
  853. //[self checkBoxHeartbeatFun];
  854. }
  855. //#pragma mark 检测盒子的心跳情况
  856. //- (void)checkBoxHeartbeatFun
  857. //{
  858. // //2、点击系统升级弹框确定按钮后30分钟内不弹;
  859. // NSNumber *preSecondNum = [HWDataManager getNumberWithKey:stringKeyAddSn(@"disenable_type1_BoxHeartbeat")];
  860. // if(preSecondNum){
  861. // long seconds = [iTools getNowTimeStamp];
  862. // if(seconds - preSecondNum.longValue <= 60*30){
  863. // return;
  864. // }
  865. // }
  866. //
  867. // //3、重启、恢复出厂设备、首次设置密码 3个情况下8分钟之内不弹
  868. // NSNumber *preSecondNum2 = [HWDataManager getNumberWithKey:stringKeyAddSn(@"disenable_type2_BoxHeartbeat")];
  869. // if(preSecondNum2){
  870. // long seconds = [iTools getNowTimeStamp];
  871. // if(seconds - preSecondNum2.longValue <= 60*8){
  872. // return;
  873. // }
  874. // }
  875. //
  876. // if(ksharedAppDelegate.didShowBoxHeartbeatAlertType
  877. // ||[webRtcManager shareManager].isResetingType
  878. // ||[webRtcManager shareManager].isRebootIngType
  879. // || [ksharedAppDelegate didShowImageRenewViewFun]){
  880. // return;
  881. // }
  882. //
  883. // //1.隐私模式密码界面 3秒检测一次是否输入完成密码了
  884. // if(ksharedAppDelegate.isDidShowPwdType){
  885. // KWeakSelf
  886. // dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
  887. // [weakSelf checkBoxHeartbeatFun];
  888. // });
  889. //
  890. // return;
  891. // }
  892. //
  893. // //test code
  894. //// [[BoxHeartbeatAlertTool shareInstance] showBoxHeartbeatAlertFun:2 didClickBut:^(NSInteger tag) {
  895. ////
  896. //// }];
  897. //
  898. // if(ksharedAppDelegate.isWebSockLinkOKAginType && ksharedAppDelegate.cloudPhoneExtraFileListMod){
  899. // return;
  900. // }
  901. //
  902. // NSMutableDictionary *paraDict = [NSMutableDictionary new];
  903. //
  904. // KWeakSelf
  905. // [[netWorkManager shareInstance] CommonGetWithCallBackCode:queryHeartbeat Parameters:paraDict success:^(id _Nonnull responseObject){
  906. // queryHeartbeatModel *heartbeatMod = [[queryHeartbeatModel alloc] initWithDictionary:responseObject error:nil];
  907. // if(heartbeatMod && heartbeatMod.data){
  908. // [weakSelf checkBoxHeartbeatToShowPopViewFunBy:heartbeatMod];
  909. // }
  910. //
  911. // } failure:^(NSError * _Nonnull error) {
  912. // }];
  913. //
  914. //}
  915. //
  916. //#pragma mark 根据盒子的心跳情况 显示异常谈了
  917. //- (void)checkBoxHeartbeatToShowPopViewFunBy:(queryHeartbeatModel*)heartbeatMod
  918. //{
  919. // if(!heartbeatMod || !heartbeatMod.data){
  920. // return;
  921. // }
  922. //
  923. // if (//!heartbeatMod.data.frpStatus&&
  924. // !heartbeatMod.data.hostAgentStatus
  925. // &&!heartbeatMod.data.containerAgentStatus) {//全部异常
  926. // [[BoxHeartbeatAlertTool shareInstance] showBoxHeartbeatAlertFun:1 didClickBut:^(NSInteger tag) {
  927. //
  928. // }];
  929. // }
  930. // else if (heartbeatMod.data.hostAgentStatus
  931. // //&& !heartbeatMod.data.frpStatus
  932. // && !heartbeatMod.data.containerAgentStatus) {//frp异常
  933. // [[BoxHeartbeatAlertTool shareInstance] showBoxHeartbeatAlertFun:2 didClickBut:^(NSInteger tag) {
  934. //
  935. // }];
  936. // }
  937. //}
  938. #pragma mark 输入密码完成
  939. - (void)didInpuPwdOkFun
  940. {
  941. // KWeakSelf
  942. // mainBlock(^{
  943. // //weakSelf.tableView.userInteractionEnabled = YES;
  944. // });
  945. }
  946. #pragma mark 文件上传跳转上传记录
  947. - (void)gotoUploadFileRecordByFileAppWithUrls:(NSArray*)urls
  948. {
  949. if(!urls || urls.count == 0){
  950. [self showTabbarFun];
  951. return;
  952. }
  953. uploadFileRecordViewController *vc = [uploadFileRecordViewController new];
  954. [self.navigationController pushViewController:vc animated:YES];
  955. vc.isUploadingType = YES;
  956. [vc gotoUploadFileByFileApp:urls];
  957. }
  958. @end