// // ASHelpListViewController.m // Asteria // // Created by iOS on 2023/7/5. // #import "ASHelpListViewController.h" #import "ASSettingListCell.h" @interface ASHelpListViewController () @property (nonatomic, strong) UITableView *tableV; //@property (nonatomic, strong) KWSettingLinkListViewModel *vm; @end @implementation ASHelpListViewController - (void)viewDidLoad { [super viewDidLoad]; self.titleStr = self.isHelp ? @"Help & Support" : @"Customer Service"; [self setNavRightSearch:^{ }]; self.statusBgV.backgroundColor = Col_FFF; self.customNavBar.backgroundColor = Col_FFF; [self loadSubVs]; // self.vm = [KWSettingLinkListViewModel new]; [self configData]; } - (void)configData { // [MBProgressHUD showHUDAddedTo:self.view animated:true]; // if (self.isHelp) { // @weakify(self); // [self.vm getHelpListData:^{ // [MBProgressHUD hideHUDForView:weak_self.view animated:true]; // [weak_self.tableV reloadData]; // }]; // } else { // @weakify(self); // [self.vm getCusServeListData:^{ // [MBProgressHUD hideHUDForView:weak_self.view animated:true]; // [weak_self.tableV reloadData]; // }]; // } // [self.tableV reloadData]; } - (void)loadSubVs { [self.view addSubview:self.tableV]; [self.tableV mas_makeConstraints:^(MASConstraintMaker *make) { make.top.equalTo(self.customNavBar.mas_bottom); make.left.right.equalTo(self.view); make.bottom.equalTo(self.view.mas_safeAreaLayoutGuideBottom); }]; } - (UITableView *)tableV { if (!_tableV) { UITableView *tabV = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain]; tabV.backgroundColor = [UIColor colorWithHexString:@"#F8F8F8"]; [tabV registerClass:[ASSettingListCell class] forCellReuseIdentifier:@"ASSettingListCell"]; tabV.delegate = self; tabV.dataSource = self; tabV.rowHeight = UITableViewAutomaticDimension; tabV.estimatedRowHeight = 100; tabV.separatorStyle = UITableViewCellSeparatorStyleNone; UIView *v = [UIView new]; v.frame = CGRectMake(0, 0, KScreenWidth, 10); v.backgroundColor = [UIColor colorWithHexString:@"#f8f8f8"]; tabV.tableHeaderView = v; _tableV = tabV; } return _tableV; } - (void)toActiveVc:(NSString *)pageUrl title:(NSString *)tit { [Fuction_Tool push_BaseWebUrl:pageUrl webTitle:tit]; } #pragma mark - UITableViewDelegate,UITableViewDataSource - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { // if (![self checkLogin:true]) { // return; // } // KWMineUrlLinkModel *linkM = self.vm.linkArr[indexPath.row]; // [self toActiveVc:linkM.url title:linkM.title]; } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return 10;//self.vm.linkArr.count; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { ASSettingListCell *cell = [tableView dequeueReusableCellWithIdentifier:@"ASSettingListCell" forIndexPath:indexPath]; // KWMineUrlLinkModel *link = self.vm.linkArr[indexPath.row]; // [cell setTitle:link.title points:@"" enable:true]; [cell setTitle:@"Shipping & Delivery" points:@"" enable:true]; return cell; } @end