// // JXMyHelpCerVc.m // shiku_im // // Created by 123 on 2020/5/15. // Copyright © 2020 Reese. All rights reserved. // #import "JXMyHelpCerVc.h" #import "JXMyHelpCerCell.h" #import "JXMybossVc.h" @interface JXMyHelpCerVc () @property (nonatomic, strong) UITableView * tableView; @property (nonatomic,strong) NSMutableArray *dataArr; @end @implementation JXMyHelpCerVc - (void)gobackBtnClcik{ [self.navigationController popViewControllerAnimated:NO]; } - (void)viewDidLoad { [super viewDidLoad]; _dataArr=[NSMutableArray array]; [self defineNavBar:@"帮助中心" andRinghtBtnImg:@""]; _tableView= [[UITableView alloc]initWithFrame:CGRectMake(0, JX_SCREEN_TOP+10, JX_SCREEN_WIDTH, JX_SCREEN_HEIGHT-10)style:UITableViewStylePlain ]; _tableView.delegate = self; _tableView.dataSource = self; _tableView.showsVerticalScrollIndicator = NO; _tableView.showsHorizontalScrollIndicator = NO; _tableView.backgroundColor = [UIColor whiteColor]; self.view.backgroundColor = [UIColor colorWithRed:250/255. green:250/255. blue:250/255. alpha:1.0]; [self.view addSubview:_tableView]; _tableView.tableFooterView=[UIView new]; if (@available(iOS 11.0, *)) { _tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; } else { // Fallback on earlier versions } _tableView.estimatedSectionHeaderHeight = 0; _tableView.estimatedSectionFooterHeight = 0; _tableView.estimatedRowHeight = 0; NSDictionary *dict = @{ @"statuses" : @[ @{ @"image" : @"ckjc", @"text" : @"存款教程", @"subtile" : @"存款急速到账" , @"contet" : @"7*24小时专线服务 贴心至上", @"leftIMG" : @"组2" }, @{ @"image" : @"qkjc", @"text" : @"取款教程", @"subtile" : @"急速提款只需30秒", @"contet" : @"视频专线服务 尽我所能", @"leftIMG" : @"组2" }, @{ @"image" : @"yxjs", @"text" : @"游戏介绍", @"subtile" : @"主流体育彩票玩火", @"contet" : @"视频专线服务 尽我所能", @"leftIMG" : @"组2" }, @{ @"image" : @"jszc", @"text" : @"技术支持", @"subtile" : @"提供全面技术支持", @"contet" : @"视频专线服务 尽我所能", @"leftIMG" : @"组2" }, @{ @"image" : @"lxwm", @"text" : @"联系我们", @"subtile" : @"为您提供全天候服务", @"contet" : @"视频专线服务 尽我所能", @"leftIMG" : @"组2" } ] }; _dataArr = [StatusesModel mj_objectArrayWithKeyValuesArray:dict[@"statuses"]]; [_tableView reloadData]; } -(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ return 80; } -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ return _dataArr.count;; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ JXMyHelpCerCell *cell=[JXMyHelpCerCell cellWithTableView:tableView]; StatusesModel *model =_dataArr[indexPath.row]; cell.modeL=model; if (indexPath.row==_dataArr.count) { cell.line_View.hidden=YES; } return cell; } - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ JXMybossVc *bossvc=[JXMybossVc new]; StatusesModel *model =_dataArr[indexPath.row]; if ([model.text isEqualToString:@"我的上级是谁 ?"]) { [g_navigation pushViewController:bossvc animated:YES]; } } @end