Files
yuyin_ios/SweetParty/主类/RCMic/Room/Box/手气榜/WLStakeRankCell.m
2025-08-08 11:05:33 +08:00

47 lines
1.2 KiB
Objective-C

//
// WLStakeRankCell.m
// YaYin
//
// Created by yons on 2024/11/2.
// Copyright © 2024 woniu. All rights reserved.
//
#import "WLStakeRankCell.h"
@implementation WLStakeRankCell
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
- (void)awakeFromNib {
[super awakeFromNib];
self.selectionStyle = UITableViewCellSelectionStyleNone;
}
- (void)setModel:(BJBoxRankModel *)model {
_model = model;
self.titleL.text = [NSString stringWithFormat:@"第%@期 %@中了%@(%@)*%@", model.mid, model.nick_name, model.gift_name, model.gift_price, model.num];
self.timeL.text = [NSString stringWithFormat:@"%@",[self time_timestampToString:[model.add_time intValue]]];
self.typeL.text = [NSString stringWithFormat:@"炼仙传说:%@", model.type_name];
}
- (NSString *)time_timestampToString:(NSInteger)timestamp{
NSDate *confromTimesp = [NSDate dateWithTimeIntervalSince1970:timestamp];
NSDateFormatter *dateFormat=[[NSDateFormatter alloc]init];
[dateFormat setDateFormat:@"yyyy-MM-dd HH:mm"];
NSString* string=[dateFormat stringFromDate:confromTimesp];
return string;
}
@end