// // AppointmentManageViewController.m // LN_School // // Created by 张嵘 on 2019/7/31. // Copyright © 2019 Danson. All rights reserved. // #import "AppointmentManageViewController.h" #import "AppointmentManageViewModel.h" @interface AppointmentManageViewController () @property (nonatomic, readwrite, strong) AppointmentManageViewModel *appointmentManageViewModel; @end @implementation AppointmentManageViewController #pragma mark - Life Cycle - (void)viewDidLoad { [super viewDidLoad]; [self initUI]; } #pragma mark - Private Functions - (void)initUI { self.title = @"预约管理"; self.view.backgroundColor = KBackGroundColor; [self goBackByNavigation]; [self.multipleSc mas_makeConstraints:^(MASConstraintMaker *make) { make.left.mas_equalTo(self.view.hd_mas_left); make.right.mas_equalTo(self.view.hd_mas_right); make.bottom.mas_equalTo(0); make.top.mas_equalTo(self.view.hd_mas_top); }]; /// 初始化数据 __weak typeof(self) weakS = self; [self.multipleSc configWithConfiger:^(HDMultipleScrollListConfiger * _Nonnull configer) { [weakS setWith:configer]; }]; /// 点击回调 [self.multipleSc.mainCollecitonV hd_setAllEventCallBack:^(id backModel, HDCallBackType type) { if (type == HDCellCallBack) { [weakS clickCell:backModel]; }else if (type == HDSectionHeaderCallBack){ [weakS clickHeader:backModel]; } }]; /// 标签个性化设置 [self jxCustomSetting]; } /// 标签个性化设置 - (void)jxCustomSetting { self.multipleSc.jxTitle.titleSelectedColor = RQSubColor; self.multipleSc.jxTitle.titleColorGradientEnabled = YES; self.multipleSc.jxTitle.titleFont = [UIFont systemFontOfSize:17]; self.multipleSc.jxLineView.indicatorLineViewColor = RQSubColor; self.multipleSc.jxLineView.lineStyle = JXCategoryIndicatorLineStyle_IQIYI; self.multipleSc.jxLineView.indicatorWidth = kScreenWidth / 10.0; self.multipleSc.jxLineView.indicatorHeight = 3; self.multipleSc.jxLineView.indicatorCornerRadius = 3; } /// 初始化数据 - (void)setWith:(HDMultipleScrollListConfiger*)configer { configer.isHeaderNeedStop = self.appointmentManageViewModel.headerStop; configer.titleContentSize = self.appointmentManageViewModel.titleSize; configer.controllers = self.appointmentManageViewModel.controllers; configer.titles = self.appointmentManageViewModel.titles; } - (void)clickCell:(HDCellModel*)cellM { NSLog(@"点击了%zd--%zd cell",cellM.indexP.section,cellM.indexP.item); } - (void)clickHeader:(HDSectionModel*)secM { NSLog(@"点击了段头"); } #pragma mark - Lazy Load - (AppointmentManageViewModel *)appointmentManageViewModel { if (!_appointmentManageViewModel) { _appointmentManageViewModel = [[AppointmentManageViewModel alloc] init]; } return _appointmentManageViewModel; } @end