AppointmentManageViewController.m 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. //
  2. // AppointmentManageViewController.m
  3. // LN_School
  4. //
  5. // Created by 张嵘 on 2019/7/31.
  6. // Copyright © 2019 Danson. All rights reserved.
  7. //
  8. #import "AppointmentManageViewController.h"
  9. #import "AppointmentManageViewModel.h"
  10. @interface AppointmentManageViewController ()
  11. @property (nonatomic, readwrite, strong) AppointmentManageViewModel *appointmentManageViewModel;
  12. @end
  13. @implementation AppointmentManageViewController
  14. #pragma mark - Life Cycle
  15. - (void)viewDidLoad {
  16. [super viewDidLoad];
  17. [self initUI];
  18. }
  19. #pragma mark - Private Functions
  20. - (void)initUI {
  21. self.title = @"预约管理";
  22. self.view.backgroundColor = KBackGroundColor;
  23. [self goBackByNavigation];
  24. [self.multipleSc mas_makeConstraints:^(MASConstraintMaker *make) {
  25. make.left.mas_equalTo(self.view.hd_mas_left);
  26. make.right.mas_equalTo(self.view.hd_mas_right);
  27. make.bottom.mas_equalTo(0);
  28. make.top.mas_equalTo(self.view.hd_mas_top);
  29. }];
  30. /// 初始化数据
  31. __weak typeof(self) weakS = self;
  32. [self.multipleSc configWithConfiger:^(HDMultipleScrollListConfiger * _Nonnull configer) {
  33. [weakS setWith:configer];
  34. }];
  35. /// 点击回调
  36. [self.multipleSc.mainCollecitonV hd_setAllEventCallBack:^(id backModel, HDCallBackType type) {
  37. if (type == HDCellCallBack) {
  38. [weakS clickCell:backModel];
  39. }else if (type == HDSectionHeaderCallBack){
  40. [weakS clickHeader:backModel];
  41. }
  42. }];
  43. /// 标签个性化设置
  44. [self jxCustomSetting];
  45. }
  46. /// 标签个性化设置
  47. - (void)jxCustomSetting {
  48. self.multipleSc.jxTitle.titleSelectedColor = RQSubColor;
  49. self.multipleSc.jxTitle.titleColorGradientEnabled = YES;
  50. self.multipleSc.jxTitle.titleFont = [UIFont systemFontOfSize:17];
  51. self.multipleSc.jxLineView.indicatorLineViewColor = RQSubColor;
  52. self.multipleSc.jxLineView.lineStyle = JXCategoryIndicatorLineStyle_IQIYI;
  53. self.multipleSc.jxLineView.indicatorWidth = kScreenWidth / 10.0;
  54. self.multipleSc.jxLineView.indicatorHeight = 3;
  55. self.multipleSc.jxLineView.indicatorCornerRadius = 3;
  56. }
  57. /// 初始化数据
  58. - (void)setWith:(HDMultipleScrollListConfiger*)configer {
  59. configer.isHeaderNeedStop = self.appointmentManageViewModel.headerStop;
  60. configer.titleContentSize = self.appointmentManageViewModel.titleSize;
  61. configer.controllers = self.appointmentManageViewModel.controllers;
  62. configer.titles = self.appointmentManageViewModel.titles;
  63. }
  64. - (void)clickCell:(HDCellModel*)cellM {
  65. NSLog(@"点击了%zd--%zd cell",cellM.indexP.section,cellM.indexP.item);
  66. }
  67. - (void)clickHeader:(HDSectionModel*)secM {
  68. NSLog(@"点击了段头");
  69. }
  70. #pragma mark - Lazy Load
  71. - (AppointmentManageViewModel *)appointmentManageViewModel {
  72. if (!_appointmentManageViewModel) {
  73. _appointmentManageViewModel = [[AppointmentManageViewModel alloc] init];
  74. }
  75. return _appointmentManageViewModel;
  76. }
  77. @end