Files
featherVoice/QXLive/Mine(音域)/View/家族/QXFamilyTopCell.m
2025-11-28 22:43:06 +08:00

56 lines
2.2 KiB
Objective-C

//
// QXFamilyTopCell.m
// QXLive
//
// Created by 启星 on 2025/11/26.
//
#import "QXFamilyTopCell.h"
#import "QXFamilyPriceRecordViewController.h"
@implementation QXFamilyTopCell
+(instancetype)cellWithTableView:(UITableView *)tableView{
static NSString *cellId = @"QXFamilyTopCell";
QXFamilyTopCell *cell = [tableView dequeueReusableCellWithIdentifier:cellId];
if (!cell) {
cell = [[NSBundle mainBundle] loadNibNamed:cellId owner:nil options:nil].lastObject;
cell.backgroundColor = [UIColor clearColor];
cell.contentView.backgroundColor = [UIColor clearColor];
cell.selectionStyle = UITableViewCellSelectionStyleNone;
}
return cell;
}
- (void)awakeFromNib {
[super awakeFromNib];
// Initialization code
}
- (IBAction)familyGroupAction:(id)sender {
if (self.model.group_members_lists.count == 0) {
showToast(@"家族群至少需要签约一位徒弟");
}else{
[[QXGlobal shareGlobal] chatWithGroupId:self.model.group_id cover:self.model.group_owner_info.avatar name:[NSString stringWithFormat:@"%@的家族",self.model.group_owner_info.nickname] navagationController:self.viewController.navigationController];
}
}
-(void)setModel:(QXFamilyModel *)model{
_model = model;
[self.headerView setHeadIcon:model.group_owner_info.avatar dress:model.group_owner_info.dress];
[self.headerView.nobilityImageView sd_setImageWithURL:[NSURL URLWithString:model.group_owner_info.nobility_image]];
self.nameLabel.text = model.group_owner_info.nickname;
self.IdLabel.text = [NSString stringWithFormat:@"ID:%@",model.group_owner_info.user_code];
self.priceLabel.text = model.group_earnings;
[self.timesBtn setTitle:[NSString stringWithFormat:@"签约次数:%@",model.group_members_num] forState:(UIControlStateNormal)];
}
- (IBAction)moreAction:(id)sender {
QXFamilyPriceRecordViewController *vc = [[QXFamilyPriceRecordViewController alloc] init];
[self.viewController.navigationController pushViewController:vc animated:YES];
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
@end