43 lines
1.4 KiB
Mathematica
43 lines
1.4 KiB
Mathematica
|
|
//
|
||
|
|
// YYKTVChujiaInfoView.m
|
||
|
|
// SweetParty
|
||
|
|
//
|
||
|
|
// Created by bj_szd on 2024/1/5.
|
||
|
|
//
|
||
|
|
|
||
|
|
#import "YYKTVChujiaInfoView.h"
|
||
|
|
|
||
|
|
@interface YYKTVChujiaInfoView ()
|
||
|
|
|
||
|
|
@property (weak, nonatomic) IBOutlet UIView *chujiaBgView;
|
||
|
|
|
||
|
|
@end
|
||
|
|
|
||
|
|
@implementation YYKTVChujiaInfoView
|
||
|
|
|
||
|
|
- (void)awakeFromNib {
|
||
|
|
[super awakeFromNib];
|
||
|
|
|
||
|
|
self.chujiaBgView.backgroundColor = [UIColor bm_colorGradientChangeWithSize:CGSizeMake(110, 40) direction:FXGradientChangeDirectionHorizontal startColor:HEXCOLOR(0x9FF6DD) endColor:HEXCOLOR(0x0DFFB9)];
|
||
|
|
}
|
||
|
|
|
||
|
|
- (void)setDataDict:(NSDictionary *)dataDict {
|
||
|
|
_dataDict = dataDict;
|
||
|
|
|
||
|
|
NSString *singPic = [dataDict[@"room_song_info"][@"user_info"] safeStringForKey:@"head_pic"];
|
||
|
|
[self.singAvatarImgV sd_setImageWithURL:[NSURL URLWithString:singPic] placeholderImage:kDefaultUserIcon];
|
||
|
|
|
||
|
|
NSInteger is_user_auction = [dataDict[@"room_song_info"] safeIntForKey:@"is_user_auction"];
|
||
|
|
if (is_user_auction == 1) {
|
||
|
|
self.chujiaView.hidden = NO;
|
||
|
|
NSDictionary *chujiaInfo = dataDict[@"room_song_info"][@"user_auction_info"];
|
||
|
|
[self.chujiaAvatarImgV sd_setImageWithURL:[NSURL URLWithString:[chujiaInfo safeStringForKey:@"head_pic"]] placeholderImage:kDefaultUserIcon];
|
||
|
|
self.chujiaNicknameLab.text = [chujiaInfo safeStringForKey:@"nick_name"];
|
||
|
|
self.chujiaPriceLab.text = [chujiaInfo safeStringForKey:@"auction_price"];
|
||
|
|
}else {
|
||
|
|
self.chujiaView.hidden = YES;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
@end
|