Files
2025-08-08 11:05:33 +08:00

74 lines
2.1 KiB
Objective-C
Executable File

//
// SPHelpListVC.m
// SweetParty
//
// Created by bj_szd on 2022/6/9.
//
#import "SPHelpListVC.h"
#import "SPMineSettingCell.h"
#import "BJWebVC.h"
#import "SPFeedbackVC.h"
@interface SPHelpListVC ()
@property (nonatomic, strong) NSArray *titlesArr;
@end
@implementation SPHelpListVC
- (void)viewDidLoad {
[super viewDidLoad];
self.titlesArr = @[@"服务协议", @"隐私协议", @"问题反馈"];
[self showNaviBarWithTitle:@"帮助与反馈"];
[self createUI];
}
-(void)createUI {
[self.tableView registerNib:[UINib nibWithNibName:@"SPMineSettingCell" bundle:nil] forCellReuseIdentifier:@"SPMineSettingCell"];
self.tableView.rowHeight = 54;
}
#pragma mark - Table view data source
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return self.titlesArr.count;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
SPMineSettingCell *cell = [tableView dequeueReusableCellWithIdentifier:@"SPMineSettingCell" forIndexPath:indexPath];
cell.selectionStyle = NO;
NSString *title = self.titlesArr[indexPath.row];
cell.titleLab.text = title;
cell.switchView.hidden = YES;
return cell;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
NSString *title = self.titlesArr[indexPath.row];
if ([title isEqualToString:@"服务协议"]) {
BJWebVC *vc = [[BJWebVC alloc] init];
vc.webUrl = [NSString stringWithFormat:@"%@%@", VERSION_HTTPS_SERVER, @"index.php/index/index/page_show?id=6"];
[vc pushSelf];
}else if ([title isEqualToString:@"隐私协议"]) {
BJWebVC *vc = [[BJWebVC alloc] init];
vc.webUrl = [NSString stringWithFormat:@"%@%@", VERSION_HTTPS_SERVER, @"index.php/index/index/page_show?id=4"];
[vc pushSelf];
}else if ([title isEqualToString:@"问题反馈"]) {
SPFeedbackVC *vc = [[SPFeedbackVC alloc] init];
[vc pushSelf];
}
}
@end