JXMyHelpCerVc.m 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. //
  2. // JXMyHelpCerVc.m
  3. // shiku_im
  4. //
  5. // Created by 123 on 2020/5/15.
  6. // Copyright © 2020 Reese. All rights reserved.
  7. //
  8. #import "JXMyHelpCerVc.h"
  9. #import "JXMyHelpCerCell.h"
  10. #import "JXMybossVc.h"
  11. @interface JXMyHelpCerVc ()<UITableViewDelegate, UITableViewDataSource>
  12. @property (nonatomic, strong) UITableView * tableView;
  13. @property (nonatomic,strong) NSMutableArray *dataArr;
  14. @end
  15. @implementation JXMyHelpCerVc
  16. - (void)gobackBtnClcik{
  17. [self.navigationController popViewControllerAnimated:NO];
  18. }
  19. - (void)viewDidLoad {
  20. [super viewDidLoad];
  21. _dataArr=[NSMutableArray array];
  22. [self defineNavBar:@"帮助中心" andRinghtBtnImg:@""];
  23. _tableView= [[UITableView alloc]initWithFrame:CGRectMake(0, JX_SCREEN_TOP+10, JX_SCREEN_WIDTH, JX_SCREEN_HEIGHT-10)style:UITableViewStylePlain ];
  24. _tableView.delegate = self;
  25. _tableView.dataSource = self;
  26. _tableView.showsVerticalScrollIndicator = NO;
  27. _tableView.showsHorizontalScrollIndicator = NO;
  28. _tableView.backgroundColor = [UIColor whiteColor];
  29. self.view.backgroundColor = [UIColor colorWithRed:250/255. green:250/255. blue:250/255. alpha:1.0];
  30. [self.view addSubview:_tableView];
  31. _tableView.tableFooterView=[UIView new];
  32. if (@available(iOS 11.0, *)) {
  33. _tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
  34. } else {
  35. // Fallback on earlier versions
  36. }
  37. _tableView.estimatedSectionHeaderHeight = 0;
  38. _tableView.estimatedSectionFooterHeight = 0;
  39. _tableView.estimatedRowHeight = 0;
  40. NSDictionary *dict = @{
  41. @"statuses" : @[
  42. @{
  43. @"image" : @"ckjc",
  44. @"text" : @"存款教程",
  45. @"subtile" : @"存款急速到账" ,
  46. @"contet" : @"7*24小时专线服务 贴心至上",
  47. @"leftIMG" : @"组2"
  48. },
  49. @{
  50. @"image" : @"qkjc",
  51. @"text" : @"取款教程",
  52. @"subtile" : @"急速提款只需30秒",
  53. @"contet" : @"视频专线服务 尽我所能",
  54. @"leftIMG" : @"组2"
  55. },
  56. @{
  57. @"image" : @"yxjs",
  58. @"text" : @"游戏介绍",
  59. @"subtile" : @"主流体育彩票玩火",
  60. @"contet" : @"视频专线服务 尽我所能",
  61. @"leftIMG" : @"组2"
  62. },
  63. @{
  64. @"image" : @"jszc",
  65. @"text" : @"技术支持",
  66. @"subtile" : @"提供全面技术支持",
  67. @"contet" : @"视频专线服务 尽我所能",
  68. @"leftIMG" : @"组2"
  69. },
  70. @{
  71. @"image" : @"lxwm",
  72. @"text" : @"联系我们",
  73. @"subtile" : @"为您提供全天候服务",
  74. @"contet" : @"视频专线服务 尽我所能",
  75. @"leftIMG" : @"组2"
  76. }
  77. ]
  78. };
  79. _dataArr = [StatusesModel mj_objectArrayWithKeyValuesArray:dict[@"statuses"]];
  80. [_tableView reloadData];
  81. }
  82. -(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
  83. return 80;
  84. }
  85. -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
  86. return _dataArr.count;;
  87. }
  88. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
  89. JXMyHelpCerCell *cell=[JXMyHelpCerCell cellWithTableView:tableView];
  90. StatusesModel *model =_dataArr[indexPath.row];
  91. cell.modeL=model;
  92. if (indexPath.row==_dataArr.count) {
  93. cell.line_View.hidden=YES;
  94. }
  95. return cell;
  96. }
  97. - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
  98. JXMybossVc *bossvc=[JXMybossVc new];
  99. StatusesModel *model =_dataArr[indexPath.row];
  100. if ([model.text isEqualToString:@"我的上级是谁 ?"]) {
  101. [g_navigation pushViewController:bossvc animated:YES];
  102. }
  103. }
  104. @end