This commit is contained in:
启星
2025-11-03 09:55:25 +08:00
parent 89c9dd0898
commit f0c82c3ac7
9 changed files with 232 additions and 58 deletions

View File

@@ -17,6 +17,7 @@
#import "QXRealNameViewController.h"
#import "QXBindMobileViewController.h"
#import "QXAliBindViewController.h"
#import "QXWalletRuleView.h"
@interface QXWalletViewController ()<UITableViewDelegate,UITableViewDataSource,QXWalletHomeTopViewDelegate>
@property (nonatomic,strong)QXWalletHomeTopView *topView;
@@ -38,22 +39,45 @@
-(void)setNavgationItems{
[super setNavgationItems];
self.navigationItem.title = QXText(@"钱包");
UIButton*recordBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 44, 44)];
[recordBtn setTitle:QXText(@"钱包规则") forState:(UIControlStateNormal)];
[recordBtn setTitleColor:RGB16(0xFF8ACC) forState:(UIControlStateNormal)];
recordBtn.titleLabel.font = [UIFont systemFontOfSize:16];
[recordBtn addTarget:self action:@selector(showRule) forControlEvents:(UIControlEventTouchUpInside)];
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:recordBtn];
}
- (void)initSubViews{
NSArray *section1 = @[
QXText(@"金币收支"),
QXText(@"钻石收支"),
];
NSArray *section2 = @[
QXText(@"钻石换币"),
QXText(@"绑定管理"),
];
NSArray *section2;
if (QXGlobal.shareGlobal.isOpenRecharge){
section2 = @[
QXText(@"钻石换币"),
QXText(@"绑定管理"),
];
}else{
section2 = @[
QXText(@"钻石换币")
];
}
[self.dataArray addObject:section1];
[self.dataArray addObject:section2];
self.tableView.tableHeaderView = self.topView;
[self.view addSubview:self.tableView];
}
-(void)showRule{
QXWalletRuleView *ruleView = [[QXWalletRuleView alloc] init];
MJWeakSelf
ruleView.toWalletBlock = ^{
};
[ruleView showInView:self.view];
}
#pragma mark - UITableViewDelegate,UITableViewDataSource
-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
return self.dataArray.count;