提交
This commit is contained in:
43
QXLive/Mine(音域)/View/我的房间/QXMyCpRoomListCell.m
Normal file
43
QXLive/Mine(音域)/View/我的房间/QXMyCpRoomListCell.m
Normal file
@@ -0,0 +1,43 @@
|
||||
//
|
||||
// QXMyCpRoomListCell.m
|
||||
// QXLive
|
||||
//
|
||||
// Created by 启星 on 2025/7/1.
|
||||
//
|
||||
|
||||
#import "QXMyCpRoomListCell.h"
|
||||
#import "QXRoomDetailViewController.h"
|
||||
|
||||
@implementation QXMyCpRoomListCell
|
||||
|
||||
- (void)awakeFromNib {
|
||||
[super awakeFromNib];
|
||||
// Initialization code
|
||||
self.roomDetailBtn.backgroundColor = QXConfig.themeColor;
|
||||
[self.roomDetailBtn setTitleColor:QXConfig.btnTextColor forState:(UIControlStateNormal)];
|
||||
}
|
||||
-(void)setType:(NSInteger)type{
|
||||
_type = type;
|
||||
}
|
||||
-(void)setCpModel:(QXRoomListCpModel *)cpModel{
|
||||
_cpModel = cpModel;
|
||||
self.nickNameLabel.text = cpModel.room_name;
|
||||
self.IDLabel.text = [NSString stringWithFormat:@"ID:%@",cpModel.room_number];
|
||||
[self.leftHeaderImageView sd_setImageWithURL:[NSURL URLWithString:cpModel.user1_avatar]];
|
||||
[self.rightHeaderImageView sd_setImageWithURL:[NSURL URLWithString:cpModel.user2_avatar]];
|
||||
NSString *money = [NSString qx_showHotCountNum:cpModel.earnings.longLongValue];
|
||||
self.moneyLabel.text = [NSString stringWithFormat:@"%@",money];
|
||||
self.relationLabel.text = cpModel.relation;
|
||||
|
||||
NSTimeInterval timeInterval = [[NSDate date] timeIntervalSince1970];
|
||||
long long milliseconds = (long long)(timeInterval);
|
||||
long long time = cpModel.end_time.longLongValue - milliseconds;
|
||||
self.timeLabel.text = [NSString getTimeWithSecond:time];
|
||||
}
|
||||
- (IBAction)detailAction:(id)sender {
|
||||
QXRoomDetailViewController *vc = [[QXRoomDetailViewController alloc] init];
|
||||
vc.type = self.type;
|
||||
vc.room_id = self.cpModel.room_id;
|
||||
[self.navigationController pushViewController:vc animated:YES];
|
||||
}
|
||||
@end
|
||||
Reference in New Issue
Block a user