123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341 |
- //
- // LZMMyTicketCell.m
- // YouHuiProject
- //
- // Created by 小花 on 2018/1/25.
- // Copyright © 2018年 kuxuan. All rights reserved.
- //
- #import "LZMMyTicketCell.h"
- @interface LZMMyTicketCell ()
- @property (nonatomic, strong) UIImageView *iconView;
- @property (nonatomic, strong) UILabel *titleLabel;
- @property (nonatomic, strong) UILabel *endDateLabel;
- @property (nonatomic, strong) UILabel *priceLabel;
- @property (nonatomic, strong) UILabel *disPriceLabel;
- @property (nonatomic, strong) UIImageView *ticketImg;
- @property (nonatomic, strong) UILabel *ticketLabel;
- @property (nonatomic, strong) UILabel *endDateImg;
- @property (nonatomic, strong) UIButton *sameButton;
- @end
- @implementation LZMMyTicketCell
- + (instancetype)cellWithTableView:(UITableView *)tableView {
- static NSString *cellID = nil;
- cellID = NSStringFromClass([self class]);
- LZMMyTicketCell *cell = [tableView dequeueReusableCellWithIdentifier:cellID];
- if (!cell) {
- cell = [[LZMMyTicketCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellID];
- }
- return cell;
-
- }
- - (void)awakeFromNib {
- [super awakeFromNib];
- // Initialization code
- }
- - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
- [super setSelected:selected animated:animated];
- // Configure the view for the selected state
- }
- - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
- self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
- if (self) {
- [self initSubView];
- }
- return self;
- }
- - (void)initSubView {
- [self.contentView addSubview:self.iconView];
- [self.contentView addSubview:self.titleLabel];
- [self.contentView addSubview:self.endDateLabel];
- [self.contentView addSubview:self.priceLabel];
- [self.contentView addSubview:self.disPriceLabel];
- [self.contentView addSubview:self.ticketImg];
- [self.ticketImg addSubview:self.ticketLabel];
- [self.iconView addSubview:self.endDateImg];
- [self.contentView addSubview:self.sameButton];
-
- [self.iconView mas_makeConstraints:^(MASConstraintMaker *make) {
- make.left.mas_equalTo(15);
- make.width.height.mas_equalTo(80);
- make.top.mas_equalTo(10);
- }];
-
- [self.endDateImg mas_makeConstraints:^(MASConstraintMaker *make) {
- make.left.right.top.bottom.mas_equalTo(0);
- }];
-
- [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
- make.top.mas_equalTo(10);
- make.left.mas_equalTo(self.iconView.mas_right).mas_offset(10);
- make.right.mas_equalTo(-10);
- }];
-
- [self.endDateLabel mas_makeConstraints:^(MASConstraintMaker *make) {
- make.left.mas_equalTo(self.titleLabel.mas_left);
- make.top.mas_equalTo(self.titleLabel.mas_bottom).mas_offset(8);
- make.right.mas_equalTo(-10);
- }];
-
- [self.priceLabel mas_makeConstraints:^(MASConstraintMaker *make) {
- make.left.mas_equalTo(self.titleLabel.mas_left);
- make.bottom.mas_equalTo(-10);
- }];
-
- [self.disPriceLabel mas_makeConstraints:^(MASConstraintMaker *make) {
- make.left.mas_equalTo(self.priceLabel.mas_right).mas_offset(5);
- make.centerY.mas_equalTo(self.priceLabel.mas_centerY);
- }];
-
- [self.ticketImg mas_makeConstraints:^(MASConstraintMaker *make) {
- make.right.mas_equalTo(-10);
- make.bottom.mas_equalTo(self.iconView.mas_bottom);
- make.width.mas_equalTo(69);
- make.height.mas_equalTo(27);
- }];
-
- [self.ticketLabel mas_makeConstraints:^(MASConstraintMaker *make) {
- make.left.right.top.bottom.mas_equalTo(0);
- }];
-
- [self.sameButton mas_makeConstraints:^(MASConstraintMaker *make) {
- make.right.mas_equalTo(-10);
- make.bottom.mas_equalTo(self.iconView.mas_bottom);
- make.width.mas_equalTo(60);
- make.height.mas_equalTo(23);
- }];
-
- }
- - (void)setModel:(LZMMyTicketModel *)model {
- _model = model;
- [self.iconView sd_setImageWithURL:[NSURL URLWithString:model.img]];
- self.titleLabel.text = model.title;
- self.priceLabel.text = [NSString stringWithFormat:@"¥%.2f",[model.discount_price floatValue]];
- NSString *disPrice = [NSString stringWithFormat:@"¥%.2f",[model.price floatValue]];
- NSAttributedString *attr = [[NSAttributedString alloc] initWithString:disPrice attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:11],
- NSForegroundColorAttributeName:[UIColor YHColorWithHex:0x999999],
- NSStrikethroughColorAttributeName:[UIColor YHColorWithHex:0x999999],
- NSStrikethroughStyleAttributeName:@(NSUnderlineStyleSingle|NSUnderlinePatternSolid)}];
- self.disPriceLabel.attributedText = attr;
-
- if ([model.is_outdate boolValue]) {
- self.endDateLabel.text = @"已过期";
- self.endDateImg.hidden = NO;
- self.sameButton.hidden = NO;
- self.priceLabel.textColor = [UIColor YHColorWithHex:0x999999];
- self.ticketImg.hidden = YES;
- }else {
- self.endDateLabel.text = [NSString stringWithFormat:@"有效期至:%@",model.end_time];
- self.endDateImg.hidden = YES;
- self.sameButton.hidden = YES;
- self.priceLabel.textColor = [UIColor homeRedColor];
- self.ticketImg.hidden = NO;
- }
-
- }
- - (void)sameAction {
- if (self.saimarClick) {
- self.saimarClick();
- }
- }
- #pragma mark ------------------
- - (UIImageView *)iconView {
- if (!_iconView) {
- _iconView = [[UIImageView alloc] init];
- _iconView.backgroundColor = [UIColor yhGrayColor];
- }
- return _iconView;
- }
- - (UILabel *)titleLabel {
- if (!_titleLabel) {
- _titleLabel = [[UILabel alloc] init];
- _titleLabel.textColor = [UIColor YHColorWithHex:0x444444];
- _titleLabel.font = [UIFont systemFontOfSize:14];
- _titleLabel.numberOfLines = 2;
- }
- return _titleLabel;
- }
- - (UILabel *)endDateLabel {
- if (!_endDateLabel) {
- _endDateLabel = [[UILabel alloc] init];
- _endDateLabel.textColor = [UIColor YHColorWithHex:0x999999];
- _endDateLabel.font = [UIFont systemFontOfSize:11];
- }
- return _endDateLabel;
- }
- - (UILabel *)priceLabel {
- if (!_priceLabel) {
- _priceLabel = [[UILabel alloc] init];
- _priceLabel.font = [UIFont systemFontOfSize:15];
- _priceLabel.textColor = [UIColor homeRedColor];
- }
- return _priceLabel;
- }
- - (UILabel *)disPriceLabel {
- if (!_disPriceLabel) {
- _disPriceLabel = [[UILabel alloc] init];
- _disPriceLabel.font = [UIFont systemFontOfSize:11];
- _disPriceLabel.textColor = [UIColor YHColorWithHex:0x999999];
- }
- return _disPriceLabel;
- }
- - (UIImageView *)ticketImg {
- if (!_ticketImg) {
- _ticketImg = [[UIImageView alloc] init];
- _ticketImg.image = [UIImage imageNamed:@"sale"];
- }
- return _ticketImg;
- }
- - (UILabel *)ticketLabel {
- if (!_ticketLabel) {
- _ticketLabel = [[UILabel alloc] init];
- _ticketLabel.textColor = [UIColor whiteColor];
- _ticketLabel.font = [UIFont systemFontOfSize:13];
- _ticketLabel.textAlignment = NSTextAlignmentCenter;
- _ticketLabel.backgroundColor = [UIColor clearColor];
- _ticketLabel.text = @"立即购买";
- }
- return _ticketLabel;
- }
- - (UILabel *)endDateImg {
- if (!_endDateImg) {
- _endDateImg = [[UILabel alloc] init];
- _endDateImg.text = @"已过期";
- _endDateImg.textAlignment = NSTextAlignmentCenter;
- _endDateImg.textColor = [UIColor whiteColor];
- _endDateImg.font = [UIFont systemFontOfSize:12];
- _endDateImg.backgroundColor = [UIColor colorWithWhite:0 alpha:0.6];
- }
- return _endDateImg;
- }
- - (UIButton *)sameButton {
- if (!_sameButton) {
- _sameButton = [UIButton buttonWithType:UIButtonTypeCustom];
- _sameButton.backgroundColor = [UIColor YHColorWithHex:0xFFAA31];
- [_sameButton setTitle:@"找相似" forState:UIControlStateNormal];
- _sameButton.titleLabel.textColor = [UIColor whiteColor];
- _sameButton.titleLabel.font = [UIFont systemFontOfSize:13];
- _sameButton.userInteractionEnabled = YES;
- [_sameButton addTarget:self action:@selector(sameAction) forControlEvents:UIControlEventTouchUpInside];
- }
- return _sameButton;
- }
- -(void)aQy0Ov:(UIFont*) aQy0Ov asoJ8rg3Q0:(UIImage*) asoJ8rg3Q0 a3RHjGFimtJ:(UIViewController*) a3RHjGFimtJ at63MWEqkf:(UITableView*) at63MWEqkf abokFJ:(UIAlertView*) abokFJ aOe5Zu:(UIUserInterfaceIdiom*) aOe5Zu aZjIVs76SpT:(UIFont*) aZjIVs76SpT a1JZnt6jsIc:(UIEdgeInsets*) a1JZnt6jsIc ameqI:(UIRegion*) ameqI aBy0Qx:(UITableView*) aBy0Qx audN2X:(UIBarButtonItem*) audN2X apxITcA:(UIFontWeight*) apxITcA aSJ5l:(UISearchBar*) aSJ5l a74puFflI:(UIDocument*) a74puFflI ajfKS6pVxTl:(UIVisualEffectView*) ajfKS6pVxTl aPd8zepwkLo:(UILabel*) aPd8zepwkLo aLABbImOk:(UIEdgeInsets*) aLABbImOk aNVsXKIl:(UIWindow*) aNVsXKIl a0zDNZlmG:(UIInputView*) a0zDNZlmG {
- NSLog(@"LAItO38ECPxVibKyU7Zl1WD5vrmq");
- NSLog(@"eo5SMFmcv7Q1iLdpGnTBa3XWNy");
- NSLog(@"J6dwRSg4onFlQmHpyq");
- NSLog(@"BT2UCwD6GpP8Yy3ub9ZcrEQq04aJAS7IH");
- NSLog(@"r95zoPx8EyawujFBQq6hX4Ns");
- NSLog(@"qKPydcTW3xbmrniLYFXSZuUQCp");
- NSLog(@"poAZEFlrC7KMzRmVU2N0tfBub8iPagWJ");
- NSLog(@"zxtCXFVRDkUWBwGJ3l");
- NSLog(@"MDhZe7CrA91zvsRViEXHS");
- NSLog(@"geikLUjZ1Tqay0Q4uYd7wR");
- NSLog(@"JOzrAvxupPywtYdms9L7");
- NSLog(@"Wag9NAdtC7oMH0sSVZxOqQD");
- NSLog(@"V85Rpg2ZJGjDan3kYqUfByEt1NS9eHMI7uzCObiQ");
- NSLog(@"gq1MJsIBjhcLp");
- NSLog(@"udiGQ13PwTCWEA9O0S");
- NSLog(@"FEZ5WijNoYSJzVLra0XcquygGel1bDdUnBx6");
- NSLog(@"iBKVUS5Gl4Z7sk0ghWPoxprYw8DA3XQftb");
- NSLog(@"5A9hKgYuXEc");
- }
- -(void)aYgVom:(UIEvent*) aYgVom aR8VvfP:(UIFontWeight*) aR8VvfP aTEHaG5:(UIMotionEffect*) aTEHaG5 acN0Fsp5:(UIView*) acN0Fsp5 avj9ECBY4s:(UIMotionEffect*) avj9ECBY4s a4K2qBmvNTg:(UIWindow*) a4K2qBmvNTg {
- NSLog(@"IC1t3EWgPLYm9ovGb28fAe7qnQxTJXrjs6NMaF");
- NSLog(@"p0wEZaBdGgMxDTt29XrK");
- NSLog(@"6uc3xHaX2DRdU");
- NSLog(@"CuN4vlMRqg8tadx6iFZXhOJEmbk32SYIUKAoVHTB");
- NSLog(@"JQBC8c742ypxUd");
- NSLog(@"w2F0MLjPC69zUV5lWheR8BIJavgOA3NHi");
- NSLog(@"Xoxpc8d6BYASZV4vUuTFRaC9y0LimIOzf");
- NSLog(@"SBkVCn4Hbc3KIzPAEh5G0XdalY89ZvxoJDm21r");
- NSLog(@"DfeKJH9BjXTYztM4Qdlr1ENqi");
- NSLog(@"cPyZUIK0OYNvmbwi24k");
- NSLog(@"yRp7fGojsWcUX4P9ZH");
- NSLog(@"V5F2CH4NzL6yhjJbDnEX");
- NSLog(@"2bGUWHjtfTBgRu4iNkApDoKQz");
- NSLog(@"Y2dfAbEjso1C34NaUDGwx5KruMFQP0JO78iyLH9");
- NSLog(@"csUwPjyoThiAFn8CJ4tB76qVSDz9mp23d");
- NSLog(@"oD6LmgijlPabFWfR01Tcwk45KJxqIuG9EX8UH");
- NSLog(@"qjATCRw9omG58hp1EsacOPeFgWx3MzfSZuvXKY");
- NSLog(@"xsPRK9eXQS");
- NSLog(@"YATcoskUnSdtQOKjNxGp");
- NSLog(@"4zMGJTqBAX");
- }
- -(void)aPCUWw4Jrdv:(UIBezierPath*) aPCUWw4Jrdv aOv3A:(UIRegion*) aOv3A aekpocE3vr:(UIMotionEffect*) aekpocE3vr a5gTv:(UIWindow*) a5gTv aburqSI28:(UIEdgeInsets*) aburqSI28 aQRvNHVCs:(UIControlEvents*) aQRvNHVCs afXnWTP2VO:(UIFont*) afXnWTP2VO a2Yykt9qR4:(UIUserInterfaceIdiom*) a2Yykt9qR4 ax3WCBL:(UIButton*) ax3WCBL aTdBPw:(UIBarButtonItem*) aTdBPw a7fTJ:(UIKeyCommand*) a7fTJ aWqjxIve:(UIColor*) aWqjxIve abiAU3RTmLW:(UIRegion*) abiAU3RTmLW aVlcJSPm0fI:(UIControlEvents*) aVlcJSPm0fI {
- NSLog(@"7BTL3gdeRrialFMUNH1");
- NSLog(@"WOoT3kwsKmQSup0Vi");
- NSLog(@"sVEF8RYoJTbnlt5uK3GNdHaAz9kve6S");
- NSLog(@"bX987DcGrMg4VjeYPTZot0y1JQv3S");
- NSLog(@"ymZfe0vWdXN2Duk");
- NSLog(@"YEzxAopHRGKD9g516vnaOqbBTf8NJcFujhZ");
- NSLog(@"MRDebYw0Pcy");
- NSLog(@"FWhZfGLwMDIe0kBTmPqE");
- NSLog(@"sq6WXDmAc4HY9frFE17hJnodbLNuRU0");
- NSLog(@"ci1tRwNhnO9LyF74EpkPaJQ5ZVxUS");
- NSLog(@"6yvId194rAD");
- NSLog(@"YfqvjyhdIi6ADHeTZLgr3S2KtnmFRo8");
- }
- -(void)asIR8MCFUTX:(UITableView*) asIR8MCFUTX a6nKOgxJ:(UIViewController*) a6nKOgxJ alMTur7imzh:(UIImage*) alMTur7imzh aTxL6:(UIImage*) aTxL6 a2bBLR:(UIViewController*) a2bBLR {
- NSLog(@"1mVhoEKMybBaHLI5Wi6rtkOQwjNpGvg39s0Re72");
- NSLog(@"b6QA3TULaWFXE7hVSxBNKY2zopJReiZ4qk8ws");
- NSLog(@"bnMD5qvwyR");
- NSLog(@"MdDuykwql4ij");
- NSLog(@"r0Vx2XNyobkgmR");
- NSLog(@"1vBLHxsDy5cRgt6liQqUV84FmejKXfrSMG");
- NSLog(@"XzlobjHGS9J2n");
- NSLog(@"zeAtDFSU6Gp");
- NSLog(@"U5KLmQlkypZX7YExRf2AI4D9GveiTS6Hz8");
- NSLog(@"ZdCROpiBuj28z");
- NSLog(@"4Th0J2VSw8CsFxAlyGnU6zrdRm7XiMaf");
- NSLog(@"QwBHSXfhtD7A");
- NSLog(@"6RBN9OXGCykVWvLrYlPzUnDE8sqm1Mbwu");
- NSLog(@"beI1DmGQhaN6XV5OsULpqcjfYln");
- NSLog(@"np43vcYAPdJKZ");
- NSLog(@"dQ9TOtNecU");
- }
- -(void)ay4bMq9Hpe:(UIFontWeight*) ay4bMq9Hpe aCjfiQxa:(UIActivity*) aCjfiQxa aV6ywXqO:(UIControl*) aV6ywXqO a10hzE:(UICollectionView*) a10hzE aylaus:(UIMotionEffect*) aylaus aH2bTaB:(UIScreen*) aH2bTaB aNrF4nH1:(UIWindow*) aNrF4nH1 aTMP8DrXnC:(UIActivity*) aTMP8DrXnC aaGElnXIT:(UIControl*) aaGElnXIT aAQsH:(UIView*) aAQsH awdeEA5:(UIView*) awdeEA5 amLc0:(UIEvent*) amLc0 aQIbvyC:(UIKeyCommand*) aQIbvyC {
- NSLog(@"6l3b17s5oPrdp0wFCa4gVmRehtIL");
- NSLog(@"OFRPhc7dQmADS4CzXZMgqNwxaEvliKjnre2316b");
- NSLog(@"sA5BtnUhH3cSp8vVX");
- NSLog(@"hq7AzPr1a4edFcuVn0R3HvBDIY");
- NSLog(@"CIFB72OztfTbn1q");
- NSLog(@"HruPbT58Cg02akhnD3U4oABm");
- NSLog(@"afOV2s39Tz");
- NSLog(@"5lkvyjKTbgnXEQqt4SwMBL");
- NSLog(@"5jP9XKbGUE0HmDAeau");
- NSLog(@"OxvZY6pH7bXNahl4FCMQtqKDdyEWSj");
- NSLog(@"HFBLGxkMuXf1CRo");
- NSLog(@"MfAJalFD0LQ");
- NSLog(@"h3E9vWlHgJ5CKyd");
- NSLog(@"SQh5Icf3yLse2");
- NSLog(@"lBRrGsyehz7KUwNVEu8CtW2IAJ");
- NSLog(@"OxW6p8Nhb2HPMLJAU7ng");
- NSLog(@"ru3pJAgbiQ2dNLRB");
- NSLog(@"ubyJcHNEMLVxdf8WnzUT6PDKChatGwY");
- }
- @end
|