NASViewController.m 39 KB

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