首次提交
This commit is contained in:
119
QXLive/Mine(音域)/View/我的房间/QXMyRoomListCell.m
Normal file
119
QXLive/Mine(音域)/View/我的房间/QXMyRoomListCell.m
Normal file
@@ -0,0 +1,119 @@
|
||||
//
|
||||
// QXMyRoomListCell.m
|
||||
// IsLandVoice
|
||||
//
|
||||
// Created by 启星 on 2025/4/12.
|
||||
//
|
||||
|
||||
#import "QXMyRoomListCell.h"
|
||||
#import "QXRoomDetailViewController.h"
|
||||
#import "QXRoomSubsidyViewController.h"
|
||||
|
||||
@interface QXMyRoomListCell()
|
||||
@property (nonatomic,strong)NSArray *bgImageNameArray;
|
||||
@end
|
||||
@implementation QXMyRoomListCell
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
// Initialization code
|
||||
self.roomDetailBtn.backgroundColor = QXConfig.themeColor;
|
||||
[self.roomDetailBtn setTitleColor:QXConfig.btnTextColor forState:(UIControlStateNormal)];
|
||||
|
||||
[self.roomSubsidyBtn setTitleColor:RGB16(0xC58600) forState:(UIControlStateNormal)];
|
||||
self.roomSubsidyBtn.backgroundColor = RGB16A(0xDEB52E, 0.25);
|
||||
self.moneyLabel.textColor = QXConfig.themeColor;
|
||||
}
|
||||
-(void)setBgImageCount:(NSInteger)bgImageCount{
|
||||
_bgImageCount = bgImageCount;
|
||||
self.bgImageView.image = [UIImage imageNamed:self.bgImageNameArray[bgImageCount]];
|
||||
}
|
||||
-(void)setType:(NSInteger)type{
|
||||
_type = type;
|
||||
if (type == 0) {
|
||||
self.roomSubsidyBtn.hidden = NO;
|
||||
self.roomDetailBtn.hidden = NO;
|
||||
}else{
|
||||
self.roomSubsidyBtn.hidden = YES;
|
||||
self.roomDetailBtn.hidden = NO;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
//-(void)setModel:(SRLiveRoomModel *)model{
|
||||
// _model = model;
|
||||
// [self.headerImageView sd_setImageWithURL:[NSURL URLWithString:model.cover_picture] placeholderImage:[UIImage imageNamed:@"user_header_placehoulder"]];
|
||||
// self.nickNameLabel.text = model.room_name;
|
||||
// self.IDLabel.text = [NSString stringWithFormat:@"ID:%@",model.room_id];
|
||||
// NSString *fav = [NSString sr_showHotCountNum:model.favorite_count];
|
||||
// self.followLabel.text = [NSString stringWithFormat:@"关注:%@",fav];
|
||||
// NSString *online = [NSString sr_showHotCountNum:model.online_num];
|
||||
// self.onlineLabel.text = [NSString stringWithFormat:@"在线:%@",online];
|
||||
// NSString *come = [NSString sr_showHotCountNum:model.come_count];
|
||||
// self.comeCountLabel.text = [NSString stringWithFormat:@"访问:%@",come];
|
||||
// if (self.type == 0) {
|
||||
// self.todayLabel.text = @"今日收益";
|
||||
// }else{
|
||||
// self.todayLabel.text = [NSString stringWithFormat:@"收益分成比例:%@%%",model.earnings_ratio];
|
||||
// }
|
||||
// NSString *money = [NSString sr_showHotCountNum:model.today_income];
|
||||
// self.moneyLabel.text = [NSString stringWithFormat:@"%@",money];
|
||||
// [self.typeImageView sd_setImageWithURL:[NSURL URLWithString:model.label_icon] placeholderImage:nil];
|
||||
//// if ([model.label_id isEqualToString:@"111"]) {
|
||||
//// //游戏
|
||||
//// self.typeImageView.image = [UIImage imageNamed:@"Mask group 5"];
|
||||
//// }else if ([model.label_id isEqualToString:@"108"]) {
|
||||
//// //交友
|
||||
//// self.typeImageView.image = [UIImage imageNamed:@"Mask group 4"];
|
||||
//// }else{
|
||||
//// //聊天
|
||||
//// self.typeImageView.image = [UIImage imageNamed:@"Mask group 3"];
|
||||
//// }
|
||||
//}
|
||||
-(void)setModel:(QXRoomListModel *)model{
|
||||
|
||||
_model = model;
|
||||
[self.headerImageView sd_setImageWithURL:[NSURL URLWithString:model.room_cover] placeholderImage:[UIImage imageNamed:@"user_header_placehoulder"]];
|
||||
self.nickNameLabel.text = model.room_name;
|
||||
self.IDLabel.text = [NSString stringWithFormat:@"ID:%@",model.room_number];
|
||||
NSString *fav = [NSString qx_showHotCountNum:model.follow_num.longLongValue];
|
||||
self.followLabel.text = [NSString stringWithFormat:@"关注:%@",fav];
|
||||
|
||||
NSString *online = [NSString qx_showHotCountNum:model.online_num.longLongValue];
|
||||
self.onlineLabel.text = [NSString stringWithFormat:@"在线:%@",online];
|
||||
NSString *come = [NSString qx_showHotCountNum:model.visit_num.longLongValue];
|
||||
self.comeCountLabel.text = [NSString stringWithFormat:@"访问:%@",come];
|
||||
if (self.type == 0) {
|
||||
self.todayLabel.text = @"今日流水";
|
||||
}else{
|
||||
self.todayLabel.text = [NSString stringWithFormat:@"收益分成比例:%@%%",model.ratio];
|
||||
}
|
||||
NSString *money = [NSString stringWithFormat:@"%.4f",model.today_profit.doubleValue];
|
||||
self.moneyLabel.text = [NSString stringWithFormat:@"%@",money];
|
||||
[self.typeImageView sd_setImageWithURL:[NSURL URLWithString:model.label_icon] placeholderImage:nil];
|
||||
if (model.apply_status.intValue == 1) {
|
||||
self.roomWaitImageView.hidden = NO;
|
||||
}else{
|
||||
self.roomWaitImageView.hidden = YES;
|
||||
}
|
||||
}
|
||||
- (IBAction)roomDetailAction:(id)sender {
|
||||
QXRoomDetailViewController *vc = [[QXRoomDetailViewController alloc] init];
|
||||
vc.type = self.type;
|
||||
vc.room_id = self.model.room_id;
|
||||
[self.navigationController pushViewController:vc animated:YES];
|
||||
}
|
||||
- (IBAction)subsidyAction:(id)sender {
|
||||
QXRoomSubsidyViewController *vc = [[QXRoomSubsidyViewController alloc] init];
|
||||
vc.room_id = self.model.room_id;
|
||||
[self.navigationController pushViewController:vc animated:YES];
|
||||
}
|
||||
|
||||
-(NSArray *)bgImageNameArray{
|
||||
if (!_bgImageNameArray) {
|
||||
_bgImageNameArray = @[@"Group 7026",@"Group 7024",@"Group 7025"];
|
||||
}
|
||||
return _bgImageNameArray;
|
||||
}
|
||||
@end
|
||||
Reference in New Issue
Block a user