// // NasSearchViewController.m // 隐私保护 // // Created by xd h on 2025/3/18. // #import "NasSearchViewController.h" #import "searchBarSecondTypeView.h" @interface NasSearchViewController () @property (nonatomic, strong) searchBarSecondTypeView * searchBarSecondTypeV; @end @implementation NasSearchViewController - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view. [self.toolBar setHidden:YES]; [self.navigationBar setHidden:YES]; [self.navBarBGView setHidden:NO]; self.navBarBGView.backgroundColor = [UIColor whiteColor]; [self.view setBackgroundColor:[UIColor whiteColor]]; [self drawAnyView]; } - (void)drawAnyView { _searchBarSecondTypeV = [[searchBarSecondTypeView alloc] init]; [self.view addSubview:_searchBarSecondTypeV]; [_searchBarSecondTypeV mas_makeConstraints:^(MASConstraintMaker *make) { make.centerY.equalTo(self.backBtn.mas_centerY).offset(0); make.height.mas_equalTo(32.0); make.left.mas_equalTo(52.0); //make.right.mas_equalTo(-48.0); make.right.mas_equalTo(0.0); }]; KWeakSelf _searchBarSecondTypeV.didClickSearchFun = ^(NSString * _Nonnull searchText) { HLog(@"1111:%@",searchText) [weakSelf getFileListFun:NO]; }; } #pragma mark 获取文件数据 - (void)getFileListFun:(BOOL)isMoreDataType { NSMutableDictionary*paraDict = [NSMutableDictionary new]; [paraDict setValue:@"7266" forKey:@"keyword"]; //[paraDict setValue:@"doc" forKey:@"fileType"]; if(!isMoreDataType){ self.pageIndex = 0; } else{ self.pageIndex ++; } [paraDict setValue:[NSNumber numberWithInteger:self.pageIndex] forKey:@"index"]; [paraDict setValue:[NSNumber numberWithInteger:pageSizeNum] forKey:@"pageSize"]; [self showNewIndicatorHaveStrWithCanBack:YES canTouch:NO showText:NSLocalizedString(@"common_loading_tip",nil)]; KWeakSelf [[netWorkManager shareInstance] cloudPhoneGETCallBackCode:@"search" Parameters:paraDict success:^(id _Nonnull responseObject) { //[weakSelf.tableView.mj_footer endRefreshing]; [weakSelf removeNewIndicatorHaveStr]; // weakSelf.getInstalledAppListMod = [[getInstalledAppListModel alloc] initWithDictionary:responseObject error:nil]; // // if(weakSelf.getInstalledAppListMod && weakSelf.getInstalledAppListMod.status == 0){ // [weakSelf RefreshAllUIFun]; // } // } failure:^(NSError * _Nonnull error) { //[weakSelf.tableView.mj_footer endRefreshing]; [weakSelf removeNewIndicatorHaveStr]; if([AFNetworkReachabilityManager sharedManager].networkReachabilityStatus == AFNetworkReachabilityStatusNotReachable) { [[iToast makeText:NSLocalizedString(@"phone_network_fail_Tips",nil)] show]; } else{ [[iToast makeText:NSLocalizedString(@"netWork_error_show_tip",nil)] show]; } }]; } #pragma mark 上拉或者点击更多数据 - (void)getMoreNetWorkData { [self getFileListFun:YES]; } @end