NasSearchAppViewController.m 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653
  1. //
  2. // NasSearchAppViewController.m
  3. // 双子星云手机
  4. //
  5. // Created by xd h on 2025/6/17.
  6. //
  7. #import "NasSearchAppViewController.h"
  8. #import "searchBarSecondTypeView.h"
  9. #import "searchListModel.h"
  10. #import "couldPhoneFileListModel.h"
  11. #import "downloadManager.h"
  12. #import "uploadFileRecordViewController.h"
  13. #import "UIScrollView+EmptyDataSet.h"
  14. #import "downLoadPreViewCell.h"
  15. #import "editTypeHeadView.h"
  16. #import "editTypeBottomView.h"
  17. #import "editShareView.h"
  18. #import "netWorkManager.h"
  19. #import "queryShareModel.h"
  20. @interface NasSearchAppViewController ()<UITableViewDelegate,UITableViewDataSource,DZNEmptyDataSetSource, DZNEmptyDataSetDelegate>
  21. {
  22. BOOL canShareType;
  23. }
  24. @property (nonatomic, strong) UITableView *tableView;
  25. @property(nonatomic,assign) BOOL isEditType;
  26. @property(nonatomic,strong) editTypeHeadView*curEditTypeHeadView;
  27. @property(nonatomic,strong) editTypeBottomView*curEditTypeBottomView;
  28. @property(nonatomic,strong) searchBarSecondTypeView* searchBarSecondTypeV;//
  29. @property (nonatomic, strong) NSMutableArray*didSelectListArr;//选中的数据
  30. @property (nonatomic, strong) NSMutableArray*curSearchListArr;//搜索(过滤)的数据
  31. @property (nonatomic, copy) NSString *searchKeyWord;//搜索关键字
  32. @property (nonatomic, strong) UIView *tableViewHead;
  33. @property (nonatomic, strong) UILabel *tableViewHeadLabel;
  34. @end
  35. @implementation NasSearchAppViewController
  36. - (void)viewDidLoad {
  37. [super viewDidLoad];
  38. // Do any additional setup after loading the view.
  39. [self.toolBar setHidden:YES];
  40. [self.navigationBar setHidden:YES];
  41. [self.navBarBGView setHidden:NO];
  42. self.navBarBGView.backgroundColor = [UIColor whiteColor];
  43. [self.view setBackgroundColor:[UIColor whiteColor]];
  44. [self drawAnyView];
  45. _didSelectListArr = [NSMutableArray new];
  46. _curSearchListArr = [NSMutableArray new];
  47. //数据埋点
  48. //[[netWorkManager shareInstance] DataEmbeddingPointBy:2 withEventValue:@"Video"];
  49. }
  50. - (void)drawAnyView{
  51. _searchBarSecondTypeV = [[searchBarSecondTypeView alloc] init];
  52. [self.view addSubview:_searchBarSecondTypeV];
  53. [_searchBarSecondTypeV mas_makeConstraints:^(MASConstraintMaker *make) {
  54. make.centerY.equalTo(self.backBtn.mas_centerY).offset(0);
  55. make.height.mas_equalTo(32.0);
  56. make.left.mas_equalTo(52.0);
  57. //make.right.mas_equalTo(-48.0);
  58. make.right.mas_equalTo(0.0);
  59. }];
  60. KWeakSelf
  61. _searchBarSecondTypeV.didClickSearchFun = ^(NSString * _Nonnull searchText) {
  62. //HLog(@"1111:%@",searchText)
  63. weakSelf.searchKeyWord = searchText;
  64. [weakSelf.curSearchListArr removeAllObjects];
  65. [weakSelf searchListDataFun];
  66. };
  67. _curEditTypeHeadView = [[editTypeHeadView alloc] init];
  68. _curEditTypeHeadView.hidden = YES;
  69. [self.navBarBGView addSubview:_curEditTypeHeadView];
  70. [_curEditTypeHeadView mas_makeConstraints:^(MASConstraintMaker *make) {
  71. make.left.mas_equalTo(0);
  72. make.right.mas_equalTo(0);
  73. make.bottom.mas_equalTo(0);
  74. make.height.mas_equalTo(NAVIHEIGHT - AdaptNaviHeight);
  75. }];
  76. #pragma mark 编辑状态的 取消 和全选按钮 响应事件
  77. _curEditTypeHeadView.didClickButtonFun = ^(NSInteger tag) {
  78. if(tag==1){
  79. [weakSelf userCancelEditTypeFun];
  80. }
  81. };
  82. _curEditTypeHeadView.didClickSelectAllFun = ^(UIButton * _Nonnull but) {
  83. [weakSelf didClickSelectAllButton:but];
  84. };
  85. _curEditTypeBottomView = [[editTypeBottomView alloc] init];
  86. _curEditTypeBottomView.hidden = YES;
  87. [self.view addSubview:_curEditTypeBottomView];
  88. [_curEditTypeBottomView mas_makeConstraints:^(MASConstraintMaker *make) {
  89. make.left.mas_equalTo(0);
  90. make.right.mas_equalTo(0);
  91. make.bottom.mas_equalTo(0);
  92. make.height.mas_equalTo(60 + AdaptTabHeight);
  93. }];
  94. #pragma mark 编辑状态的 下载 分享 删除 响应事件
  95. _curEditTypeBottomView.didClickButtonFun = ^(NSInteger tag) {
  96. if(tag==1){
  97. [weakSelf gotoDownLoadFileFun];
  98. }
  99. else if(tag==2){
  100. [weakSelf gotoShareViewFun];
  101. }
  102. else if(tag==3){
  103. [weakSelf showDeleteAlearViewFun];
  104. }
  105. };
  106. [self.view addSubview:self.tableView];
  107. [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
  108. make.left.mas_equalTo(0);
  109. make.right.mas_equalTo(0);
  110. //make.bottom.mas_equalTo(-(safeArea));
  111. make.bottom.mas_equalTo(0);
  112. make.top.equalTo(self.navBarBGView.mas_bottom).offset(10.f);
  113. }];
  114. self.tableView.hidden = YES;
  115. _tableViewHead = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_W, 30)];
  116. _tableViewHead.backgroundColor = [UIColor whiteColor];
  117. //self.tableView.tableHeaderView = _tableViewHead;
  118. _tableViewHeadLabel = [[UILabel alloc] init];
  119. _tableViewHeadLabel.textColor = [UIColor hwColor:@"#0A132B"];
  120. _tableViewHeadLabel.font = [UIFont systemFontOfSize:12.0];
  121. _tableViewHeadLabel.text = NSLocalizedString(@"Search_Total_result",nil);
  122. [_tableViewHead addSubview:_tableViewHeadLabel];
  123. [_tableViewHeadLabel mas_makeConstraints:^(MASConstraintMaker *make) {
  124. make.left.mas_equalTo(15.0);
  125. make.right.mas_equalTo(0.0);
  126. make.top.mas_equalTo(0.0);
  127. make.bottom.mas_equalTo(0.0);
  128. }];
  129. }
  130. #pragma mark - 懒加载
  131. - (UITableView *)tableView{
  132. if (!_tableView) {
  133. _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_W, SCREEN_H - TABBARHEIGHT) style:UITableViewStylePlain];
  134. _tableView.delegate = self;
  135. _tableView.dataSource = self;
  136. _tableView.showsVerticalScrollIndicator = NO;
  137. _tableView.showsHorizontalScrollIndicator = NO;
  138. // _tableView.contentInset = UIEdgeInsetsMake(-H_STATE_BAR, 0, 0, 0);
  139. [_tableView setSeparatorStyle:(UITableViewCellSeparatorStyleNone)];
  140. [_tableView setSeparatorColor:[UIColor clearColor]];
  141. [_tableView setBackgroundColor:[UIColor clearColor]];
  142. [_tableView setTableFooterView:[UIView new]];
  143. [_tableView setBounces:YES];
  144. if (@available(iOS 15.0, *)) {
  145. _tableView.sectionHeaderTopPadding = 0;
  146. }
  147. //空数据引入第三方开源处理
  148. _tableView.emptyDataSetSource = self;
  149. _tableView.emptyDataSetDelegate = self;
  150. }
  151. return _tableView;
  152. }
  153. #pragma mark - 列表委托
  154. - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
  155. return 1;
  156. }
  157. - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
  158. return _curSearchListArr.count;
  159. }
  160. - (downLoadPreViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
  161. __block NSInteger row = indexPath.row;
  162. static NSString *identifier = @"downLoadPreViewCell";
  163. downLoadPreViewCell * cell = [tableView dequeueReusableCellWithIdentifier:identifier];
  164. cell.selectionStyle = UITableViewCellSelectionStyleNone;
  165. if (!cell){
  166. cell = [[downLoadPreViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:identifier];
  167. [cell setSelectionStyle:UITableViewCellSelectionStyleNone];
  168. [cell setBackgroundColor:[UIColor clearColor]];
  169. [cell setAccessoryType:(UITableViewCellAccessoryNone)];
  170. [cell.bgViewLayer removeFromSuperlayer];
  171. [cell.titleLabel2 setHidden:NO];
  172. [cell.rightImage setHidden:YES];
  173. [cell.lineView setHidden:YES];
  174. [cell.checkButton setHidden:NO];
  175. }
  176. if(row < _curSearchListArr.count){
  177. getInstalledAppModel* dataModel = _curSearchListArr[row];
  178. cell.curGetInstalledAppMod = dataModel;
  179. KWeakSelf
  180. cell.didClickSwitch = ^(BOOL SwitchOn) {
  181. [weakSelf userCheckFilePreviewByRow:row];
  182. };
  183. }
  184. return cell;
  185. }
  186. - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
  187. return 70;
  188. }
  189. #pragma mark 空数据
  190. - (UIImage *)imageForEmptyDataSet:(UIScrollView *)scrollView {
  191. NSString *imageName = @"common_no_data_pic";
  192. return [UIImage imageNamed:imageName];
  193. }
  194. - (NSAttributedString *)titleForEmptyDataSet:(UIScrollView *)scrollView {
  195. NSString *text = NSLocalizedString(@"Search_nodata_tip",nil);
  196. NSDictionary *attributes = @{NSFontAttributeName: [UIFont systemFontOfSize:16.0f],
  197. NSForegroundColorAttributeName: HW999999Color};
  198. return [[NSAttributedString alloc] initWithString:text attributes:attributes];
  199. }
  200. //调整图片位置
  201. - (CGFloat)verticalOffsetForEmptyDataSet:(UIScrollView *)scrollView {
  202. return -150;
  203. }
  204. #pragma mark 用户长按图片进入编辑
  205. - (void)setViewEditTypeFun
  206. {
  207. _isEditType = YES;
  208. _searchBarSecondTypeV.hidden = YES;
  209. //[self.tableView reloadData];
  210. _curEditTypeHeadView.hidden = NO;
  211. _curEditTypeBottomView.hidden = NO;
  212. [self RefreshAllUIFun];
  213. }
  214. #pragma mark 用户取消编辑编辑
  215. - (void)userCancelEditTypeFun
  216. {
  217. //数据还原
  218. for (getInstalledAppModel*model in _didSelectListArr) {
  219. model.isSelectType = NO;
  220. }
  221. [_didSelectListArr removeAllObjects];
  222. _isEditType = NO;
  223. _searchBarSecondTypeV.hidden = NO;
  224. //[self.tableView reloadData];
  225. _curEditTypeHeadView.hidden = YES;
  226. _curEditTypeBottomView.hidden = YES;
  227. [self RefreshAllUIFun];
  228. }
  229. #pragma mark 更新UI界面
  230. - (void)RefreshAllUIFun
  231. {
  232. [self.tableView reloadData];
  233. KWeakSelf
  234. [self.tableView mas_remakeConstraints:^(MASConstraintMaker *make) {
  235. make.left.mas_equalTo(0);
  236. make.right.mas_equalTo(0);
  237. if(weakSelf.isEditType){
  238. make.bottom.equalTo(weakSelf.curEditTypeBottomView.mas_top).offset(0.0);
  239. }
  240. else{
  241. make.bottom.mas_equalTo(0);
  242. }
  243. make.top.equalTo(self.navBarBGView.mas_bottom).offset(10.f);
  244. }];
  245. }
  246. - (void)userCheckFilePreviewByRow:(NSInteger)row
  247. {
  248. if(row < _curSearchListArr.count){
  249. getInstalledAppModel* dataModel = _curSearchListArr[row];
  250. if(dataModel.isSelectType){
  251. [_didSelectListArr removeObject:dataModel];
  252. }
  253. else{
  254. [_didSelectListArr addObject:dataModel];
  255. }
  256. dataModel.isSelectType = !dataModel.isSelectType;
  257. [self setEditTypeTitleFun];
  258. }
  259. }
  260. - (void)didClickSelectAllButton:(UIButton*)button
  261. {
  262. //button.selected = !button.selected;
  263. [_didSelectListArr removeAllObjects];
  264. for (getInstalledAppModel* dataModel in _curSearchListArr) {
  265. if(!button.selected){
  266. dataModel.isSelectType = button.selected;
  267. }
  268. else{
  269. [_didSelectListArr addObject:dataModel];
  270. dataModel.isSelectType = button.selected;
  271. }
  272. }
  273. [self.tableView reloadData];
  274. [self setEditTypeTitleFun];
  275. }
  276. #pragma mark 设置选中标题
  277. - (void)setEditTypeTitleFun
  278. {
  279. [_curEditTypeHeadView setTitleLabetextByNumbers:_didSelectListArr.count];
  280. if(_didSelectListArr.count > 0){
  281. [self setViewEditTypeFun];
  282. }
  283. else{
  284. [self userCancelEditTypeFun];
  285. }
  286. }
  287. #pragma mark 用户点击分享
  288. - (void)gotoShareViewFun
  289. {
  290. if (_didSelectListArr.count > 5) {
  291. [[iToast makeText:NSLocalizedString(@"share_max_count_tip2",nil)] show];
  292. return;
  293. }
  294. NSMutableArray *changeModelArr = [NSMutableArray new];
  295. for (getInstalledAppModel* dataModel in _didSelectListArr) {
  296. NASFilePicDataArrModel *model = [NASFilePicDataArrModel new];
  297. model.type = @"apk";//dataModel.fileType;
  298. model.path = dataModel.path;
  299. model.name = dataModel.name;
  300. if(dataModel.size > 0){
  301. model.size = dataModel.size;
  302. }
  303. else{
  304. model.size = dataModel.length;
  305. }
  306. model.time = dataModel.time;
  307. [changeModelArr addObject:model];
  308. }
  309. editShareView *editShareV = [[editShareView alloc] init];
  310. editShareV.didSelectListArr = changeModelArr;
  311. editShareV.shareFileType = @"3";
  312. [self.view addSubview:editShareV];
  313. [editShareV mas_makeConstraints:^(MASConstraintMaker *make) {
  314. make.left.mas_equalTo(0);
  315. make.right.mas_equalTo(0);
  316. make.bottom.mas_equalTo(0);
  317. make.top.mas_equalTo(0);
  318. }];
  319. }
  320. - (void)viewWillAppear:(BOOL)animated
  321. {
  322. [super viewWillAppear:animated];
  323. }
  324. - (void)viewDidAppear:(BOOL)animated{
  325. [super viewDidAppear:animated];
  326. [self showDownloadTipFun];
  327. if(!_curSearchListArr || _curSearchListArr.count == 0){
  328. [self queryShareSwitchFunFun];
  329. }
  330. }
  331. - (void)viewWillDisappear:(BOOL)animated{
  332. [super viewWillDisappear:animated];
  333. //[self removeNewIndicator];
  334. [self removeNewIndicatorHaveStr];
  335. }
  336. - (void)gotoDownloadloadFileRecordFun
  337. {
  338. uploadFileRecordViewController *vc = [uploadFileRecordViewController new];
  339. [self.navigationController pushViewController:vc animated:YES];
  340. vc.isDownloadingType = YES;
  341. //[vc gotoDownloadFile:_downloadFileBottomV.indexPathsForSelectedItems];
  342. }
  343. - (void)showDownloadTipFun
  344. {
  345. BOOL didReadUploadTipType = [HWDataManager getBoolWithKey:Const_file_downLoad_need_read];
  346. if(didReadUploadTipType){
  347. return;
  348. }
  349. //KWeakSelf
  350. /*弹窗提示恢复出厂*/
  351. ComontAlretViewController *nextVC = [[ComontAlretViewController alloc] initWithTiTle:@""
  352. msg:NSLocalizedString(@"upload_download_need_read_msg",nil)
  353. imageStr:@""
  354. cancelTitle:NSLocalizedString(@"guide_set_pwd_guide_know",nil)
  355. okTitle:@""
  356. isOkBtnHighlight:NO
  357. didClickOk:^{
  358. } didClickCancel:^{
  359. [HWDataManager setBoolWithKey:Const_file_downLoad_need_read value:YES];
  360. }];
  361. nextVC.modalPresentationStyle = UIModalPresentationCustom;
  362. [self presentViewController:nextVC animated:YES completion:^{
  363. nextVC.view.superview.backgroundColor = [UIColor clearColor];
  364. }];
  365. }
  366. - (void)didiClikRightButGotoTransferListFun:(UIButton*)but
  367. {
  368. uploadFileRecordViewController *vc = [uploadFileRecordViewController new];
  369. [self.navigationController pushViewController:vc animated:YES];
  370. }
  371. #pragma mark 获取文件数据
  372. - (void)searchListDataFun
  373. {
  374. if(!_searchKeyWord || _searchKeyWord.length == 0){
  375. return;
  376. }
  377. for (getInstalledAppModel* model in _totalAPPListModel.data) {
  378. if ([model.name containsString:_searchKeyWord]) {
  379. [_curSearchListArr addObject:model];
  380. }
  381. }
  382. if (_curSearchListArr.count == 0) {
  383. self.tableView.tableHeaderView = nil;
  384. }
  385. else{
  386. if(!self.tableView.tableHeaderView){
  387. self.tableView.hidden = NO;
  388. self.tableView.tableHeaderView = _tableViewHead;
  389. }
  390. NSString *str = [[NSString alloc] initWithFormat:@"%@(%ld)",NSLocalizedString(@"Search_Total_result",nil),_curSearchListArr.count];
  391. _tableViewHeadLabel.text = str;
  392. }
  393. [self RefreshAllUIFun];
  394. }
  395. #pragma mark 文件下载
  396. - (void)gotoDownLoadFileFun
  397. {
  398. if(_didSelectListArr.count == 0){
  399. [[iToast makeText:@""] show];
  400. return;
  401. }
  402. NSMutableArray *arr = [NSMutableArray new];
  403. for (getInstalledAppModel *dataModel in _didSelectListArr) {
  404. couldPhoneFileModel* fileModel = [couldPhoneFileModel new];
  405. fileModel.fileType = dataModel.fileType;
  406. fileModel.path = dataModel.path;
  407. fileModel.name = dataModel.name;
  408. if (dataModel.size) {
  409. fileModel.length = dataModel.size;
  410. }
  411. else{
  412. fileModel.length = dataModel.length;
  413. }
  414. //fileModel.time = dataModel.duration;
  415. [arr addObject:fileModel];
  416. }
  417. uploadFileRecordViewController *vc = [uploadFileRecordViewController new];
  418. [self.navigationController pushViewController:vc animated:YES];
  419. vc.isDownloadingType = YES;
  420. [vc gotoDownloadFile:arr];
  421. }
  422. #pragma mark 删除图片
  423. - (void)showDeleteAlearViewFun
  424. {
  425. NSString *titleStr = NSLocalizedString(@"delete_file_title_msg",nil);
  426. NSString *tipStr = NSLocalizedString(@"delete_file_tip_msg",nil);
  427. KWeakSelf
  428. ComontAlretViewController *curAlretVC= [[ComontAlretViewController alloc] initWithTiTle:titleStr
  429. msg:tipStr
  430. imageStr:@""
  431. cancelTitle:NSLocalizedString(@"other_cancel",nil)
  432. okTitle:NSLocalizedString(@"other_confirm",nil) isOkBtnHighlight:YES
  433. didClickOk:^{
  434. [weakSelf delFileListFun];
  435. } didClickCancel:^{
  436. }];
  437. curAlretVC.modalPresentationStyle = UIModalPresentationCustom;
  438. [self presentViewController:curAlretVC animated:YES completion:^{
  439. curAlretVC.view.superview.backgroundColor = [UIColor clearColor];
  440. }];
  441. }
  442. #pragma mark 删除文件数据
  443. - (void)delFileListFun
  444. {
  445. NSMutableDictionary*paraDict = [NSMutableDictionary new];
  446. NSMutableArray *pathArr = [NSMutableArray new];
  447. for (getInstalledAppModel *dataModel in _didSelectListArr) {
  448. [pathArr addObject:dataModel.path];
  449. }
  450. [paraDict setValue:pathArr forKey:@"path"];
  451. [self showNewIndicatorWithCanBack:YES canTouch:NO];
  452. //NSString*code = [[NSString alloc] initWithFormat:@"delFile?path=%@",paraDict[@"path"]]; //delFile?path=[/storage/emulated/0/Download/IMG_6464.HEIC]
  453. KWeakSelf //@"delFile"
  454. [[netWorkManager shareInstance] cloudPhonePostCallBackCode:@"delFile" Parameters:paraDict success:^(id _Nonnull responseObject) {
  455. [weakSelf removeNewIndicator];
  456. SuperModel *model = [[SuperModel alloc] initWithDictionary:responseObject error:nil];
  457. if(model && model.status == 0){
  458. [[iToast makeText:NSLocalizedString(@"delete_file_suc_msg",nil)] show];
  459. [weakSelf didDeleteSucFun];
  460. }
  461. else{
  462. }
  463. } failure:^(NSError * _Nonnull error) {
  464. [weakSelf removeNewIndicator];
  465. }];
  466. //数据埋点
  467. [[netWorkManager shareInstance] DataEmbeddingPointBy:3 withEventValue:@"Video_delete"];
  468. }
  469. #pragma mark 删除成功
  470. - (void)didDeleteSucFun
  471. {
  472. //删除最近文件
  473. //apk没最近文件
  474. //2.删除已经获取到的网络数据
  475. [self deleteNetDataByDeleteSucFun];
  476. [_didSelectListArr removeAllObjects];
  477. [self setEditTypeTitleFun];
  478. }
  479. #pragma mark 删除成功后 对应删除原来获取的网络数据
  480. - (void)deleteNetDataByDeleteSucFun
  481. {
  482. //1.处理传入的全部数据
  483. NSMutableArray *afterFilterArr = [NSMutableArray new];
  484. for (getInstalledAppModel *model in _totalAPPListModel.data) {
  485. if (!model.isSelectType) {
  486. [afterFilterArr addObject:model];
  487. }
  488. }
  489. _totalAPPListModel.data = (NSArray<getInstalledAppModel>*)afterFilterArr;
  490. //2.重新搜索
  491. [_curSearchListArr removeAllObjects];
  492. [self searchListDataFun];
  493. }
  494. #pragma mark 获取分享开关
  495. -(void)queryShareSwitchFunFun
  496. {
  497. NSMutableDictionary *paraDict = [NSMutableDictionary new];
  498. [paraDict setValue:@3 forKey:@"type"];
  499. KWeakSelf
  500. [[netWorkManager shareInstance] CommonGetWithCallBackCode:queryShareSwitchFun Parameters:paraDict success:^(id _Nonnull responseObject){
  501. queryShareModel *queryShareMod = [[queryShareModel alloc] initWithDictionary:responseObject error:nil];
  502. if(queryShareMod){
  503. self->canShareType = queryShareMod.data.configValue;
  504. //weakSelf.curEditTypeBottomView.isCanShareType = self->canShareType;
  505. [weakSelf.curEditTypeBottomView setCanShaewFunBy:queryShareMod.data.configValue];
  506. }
  507. } failure:^(NSError * _Nonnull error) {
  508. }];
  509. }
  510. @end