提交
This commit is contained in:
@@ -6,8 +6,74 @@
|
||||
//
|
||||
|
||||
#import "QXRoomViewController+Bar.h"
|
||||
|
||||
#import "QXRechargeViewcController.h"
|
||||
#import "QXMineNetwork.h"
|
||||
@implementation QXRoomViewController (Bar)
|
||||
|
||||
-(void)createCoinView{
|
||||
self.coinView = [[UIView alloc] init];
|
||||
self.coinView.backgroundColor = RGB16A(0x000000, 0.4);
|
||||
[self.view addSubview:self.coinView];
|
||||
[self.coinView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.bottom.equalTo(self.bottomView.mas_top).offset(-20);
|
||||
make.right.mas_equalTo(-5);
|
||||
make.width.mas_equalTo(100);
|
||||
make.height.mas_equalTo(50);
|
||||
}];
|
||||
[self.coinView addRoundedCornersWithRadius:5];
|
||||
|
||||
self.coinImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"wallet_corn"]];
|
||||
[self.coinView addSubview:self.coinImageView];
|
||||
[self.coinImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(5);
|
||||
make.height.width.mas_equalTo(25);
|
||||
make.centerY.equalTo(self.coinView);
|
||||
}];
|
||||
|
||||
|
||||
self.coinLabel = [[UILabel alloc] init];
|
||||
self.coinLabel.textColor = RGB16(0xffffff);
|
||||
self.coinLabel.text = @"0";
|
||||
self.coinLabel.textAlignment = NSTextAlignmentCenter;
|
||||
self.coinLabel.font = [UIFont systemFontOfSize:10];
|
||||
[self.coinView addSubview:self.coinLabel];
|
||||
[self.coinLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.equalTo(self.coinImageView.mas_right).offset(2);
|
||||
make.right.equalTo(self.coinView.mas_right).offset(-5);
|
||||
make.top.equalTo(self.coinView).offset(10);
|
||||
}];
|
||||
|
||||
self.rechargeBtn = [[UIButton alloc] init];
|
||||
[self.rechargeBtn setTitleColor:QXConfig.themeColor forState:(UIControlStateNormal)];
|
||||
[self.rechargeBtn setTitle:@"充值" forState:(UIControlStateNormal)];
|
||||
self.rechargeBtn.titleLabel.font = [UIFont systemFontOfSize:12];
|
||||
[self.coinView addSubview:self.rechargeBtn];
|
||||
[self.rechargeBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.equalTo(self.coinLabel);
|
||||
make.right.equalTo(self.coinView).offset(-5);
|
||||
make.bottom.equalTo(self.coinView).offset(-5);
|
||||
make.height.mas_equalTo(20);
|
||||
}];
|
||||
|
||||
UIButton *button = [[UIButton alloc] init];
|
||||
[button addTarget:self action:@selector(rechargeAction) forControlEvents:(UIControlEventTouchUpInside)];;
|
||||
[self.coinView addSubview:button];
|
||||
[button mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.equalTo(self.coinView);
|
||||
}];
|
||||
MJWeakSelf
|
||||
[QXMineNetwork getWalletInfoSuccessBlock:^(NSString * _Nonnull coin, NSString * _Nonnull earnings, NSString * _Nonnull title, NSString * _Nonnull url) {
|
||||
weakSelf.coinLabel.text = coin;
|
||||
} failBlock:^(NSError * _Nonnull error, NSString * _Nonnull msg) {
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
-(void)rechargeAction{
|
||||
QXRechargeViewcController *vc = [[QXRechargeViewcController alloc] init];
|
||||
[self.navigationController pushViewController:vc animated:YES];
|
||||
}
|
||||
|
||||
-(void)barRoomSeductionEffectWithModel:(QXRoomChatListModel*)model{
|
||||
[self.seatContentView barRoomSeductionEffectWithModel:model];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user