NASViewController.m 38 KB

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