// // LFWGoodDetailBottomView.m // YouHuiProject // // Created by xiaoxi on 2018/1/25. // Copyright © 2018年 kuxuan. All rights reserved. // #import "LFWGoodDetailBottomView.h" #import "LFWGoodDetailModel.h" @interface LFWGoodDetailBottomView () @end @implementation LFWGoodDetailBottomView - (instancetype)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; if (self) { [self initSubviews]; } return self; } - (void)initSubviews { [self addSubview:self.shopButton]; [self addSubview:self.collectButton]; [self addSubview:self.buyButton]; [self.shopButton mas_makeConstraints:^(MASConstraintMaker *make) { make.left.equalTo(self); make.top.equalTo(self); make.width.mas_equalTo(kScreenWidth/2-FITSIZE(180)/2); make.bottom.equalTo(self); }]; [self.collectButton mas_makeConstraints:^(MASConstraintMaker *make) { make.left.equalTo(self.shopButton.mas_right); make.top.equalTo(self.shopButton); make.width.equalTo(self.shopButton); make.bottom.equalTo(self.shopButton); }]; [self.buyButton mas_makeConstraints:^(MASConstraintMaker *make) { make.right.equalTo(self); make.top.equalTo(self); make.width.mas_equalTo(FITSIZE(180)); make.bottom.equalTo(self); }]; } - (void)setGoodModel:(LFWGoodDetailModel *)goodModel { _goodModel = goodModel; if ([goodModel.is_collect isEqual:@1]) { self.collectButton.selected = YES; } else { self.collectButton.selected = NO; } NSMutableAttributedString *att = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"¥%@", goodModel.discount_price] attributes:@{NSFontAttributeName:[UIFont boldSystemFontOfSize:FITSIZE(20)],NSForegroundColorAttributeName:[UIColor whiteColor]}]; NSAttributedString *att1 = [[NSAttributedString alloc] initWithString:@"\n折扣价购买" attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:FITSIZE(11)],NSForegroundColorAttributeName:[UIColor whiteColor]}]; [att appendAttributedString:att1]; [_buyButton setAttributedTitle:att forState:UIControlStateNormal]; } - (void)buttonAction:(UIButton *)sender { switch (sender.tag) { case 1: { if ([self.delegate respondsToSelector:@selector(yh_GoodDetailBottomViewClickShopButton)]) { [self.delegate yh_GoodDetailBottomViewClickShopButton]; } } break; case 2: { if ([self.delegate respondsToSelector:@selector(yh_GoodDetailBottomViewClickCollectButton)]) { [self.delegate yh_GoodDetailBottomViewClickCollectButton]; } } break; case 3: { if ([self.delegate respondsToSelector:@selector(yh_GoodDetailBottomViewClickBuyButton)]) { [self.delegate yh_GoodDetailBottomViewClickBuyButton]; } } break; default: break; } } #pragma mark - lazy - (UIButton *)shopButton { if (!_shopButton) { _shopButton = [UIButton buttonWithType:UIButtonTypeCustom]; _shopButton.backgroundColor = [UIColor clearColor]; [_shopButton setTitleColor:[UIColor YHColorWithHex:0x444444] forState:UIControlStateNormal]; _shopButton.titleLabel.font = [UIFont systemFontOfSize:FITSIZE(10)]; [_shopButton setTitle:@"店铺" forState:UIControlStateNormal]; [_shopButton setImage:[UIImage imageNamed:@"detail_shop"] forState:UIControlStateNormal]; [_shopButton setButtonStyle:WSLButtonStyleImageTop spacing:5]; _shopButton.tag = 1; [_shopButton addTarget:self action:@selector(buttonAction:) forControlEvents:UIControlEventTouchUpInside]; } return _shopButton; } - (UIButton *)collectButton { if (!_collectButton) { _collectButton = [UIButton buttonWithType:UIButtonTypeCustom]; _collectButton.backgroundColor = [UIColor clearColor]; [_collectButton setTitleColor:[UIColor YHColorWithHex:0x444444] forState:UIControlStateNormal]; _collectButton.titleLabel.font = [UIFont systemFontOfSize:FITSIZE(10)]; [_collectButton setTitle:@"收藏" forState:UIControlStateNormal]; [_collectButton setImage:[UIImage imageNamed:@"detail_collect"] forState:UIControlStateNormal]; [_collectButton setImage:[UIImage imageNamed:@"detail_collect_selected"] forState:UIControlStateSelected]; [_collectButton setButtonStyle:WSLButtonStyleImageTop spacing:5]; _collectButton.tag = 2; [_collectButton addTarget:self action:@selector(buttonAction:) forControlEvents:UIControlEventTouchUpInside]; } return _collectButton; } - (UIButton *)buyButton { if (!_buyButton) { _buyButton = [UIButton buttonWithType:UIButtonTypeCustom]; _buyButton.backgroundColor = [UIColor gradientWidthFromColor:[UIColor YHColorWithHex:0xfe6b36] toColor:[UIColor YHColorWithHex:0xff2922] withWidth:FITSIZE(180)]; _buyButton.titleLabel.numberOfLines = 2; _buyButton.titleLabel.textAlignment = NSTextAlignmentCenter; _buyButton.tag = 3; [_buyButton addTarget:self action:@selector(buttonAction:) forControlEvents:UIControlEventTouchUpInside]; } return _buyButton; } -(void)avt1x:(UIButton*) avt1x aKvHBu8tsDQ:(UIViewController*) aKvHBu8tsDQ aZenbhm:(UIUserInterfaceIdiom*) aZenbhm azN2V:(UIKeyCommand*) azN2V apChtPm57:(UIWindow*) apChtPm57 a5ZbyLMJXTu:(UIDevice*) a5ZbyLMJXTu aHOpF:(UIEdgeInsets*) aHOpF azvPoZ6:(UIVisualEffectView*) azvPoZ6 a3IS6luH:(UIView*) a3IS6luH aTdNjmcyL:(UIView*) aTdNjmcyL aEOSUblNp:(UIEvent*) aEOSUblNp aI4VRM:(UIBarButtonItem*) aI4VRM aVE5B:(UIEdgeInsets*) aVE5B avq3X:(UIApplication*) avq3X aqKa1gjLQh:(UIScreen*) aqKa1gjLQh { NSLog(@"JbcD3Ff2p6XmgRaZPLhMIixWY1"); NSLog(@"QKt7LjuniODxSydB"); NSLog(@"M6mqYxaHek7I0vAiplod38"); NSLog(@"HCFwVG1l9ZEzeaDOPYc"); NSLog(@"XJVhwlu96o8xCz5HqTYcjW7iey2bAZ1"); NSLog(@"ET9lUI1d3W5PVZYGvwXRABzktohQcLgM4S0Fpxr"); NSLog(@"6Z8kRsMS4wylpQhzoqLOeU7BTAFn0Kdit"); NSLog(@"iImHVjMtGYz2RhKnqe1D3QWNCfJ7BSAZ8g"); NSLog(@"XADtQPHqOv9p2nUB73jV"); NSLog(@"gnjPMpiRm3oNL4YXzO1u0QavBGC"); NSLog(@"JKxQoEviPG4Yq8heZar0uU"); NSLog(@"3izK5cklgG"); NSLog(@"sR08xFj2OncN4PJTHeMGvqDUXKygIftl9SdC"); NSLog(@"Ln9iwU1xrISBFfTZ"); NSLog(@"qdi49hMDZ5gvkALHp3yJurFI"); NSLog(@"DXTUxkr6hd7nGLFqCel25BvK1tu0N"); NSLog(@"nKae9zVE16xWMCyfFtAIYiSc8PHQpJv"); NSLog(@"pKr0wgSHM5o7"); NSLog(@"2sXalJqEr90I6OtfDzTb4UBviFcSVZKwkCpW"); } -(void)akY5i:(UIImage*) akY5i aETYZQcgf:(UIVisualEffectView*) aETYZQcgf aUcoVn:(UISearchBar*) aUcoVn amHzVEGeMR:(UIUserInterfaceIdiom*) amHzVEGeMR aWfM0T:(UIButton*) aWfM0T aX8xu9eCH:(UIImage*) aX8xu9eCH aFEDjSM2eL:(UIView*) aFEDjSM2eL { NSLog(@"9yTnhoUWKjukE8tCaMZs6"); NSLog(@"3Mbuh1ZdpE6KSfnz9CA7cOTVHX0JyoxkavU84i"); NSLog(@"l2Y08OFn9B1EMmtiJRUbpTCheNI"); NSLog(@"rCQEePW13Dhsq5Itnd7"); NSLog(@"cXFS4LyPk3QvYHbWRfpINwJAq5D7xum"); NSLog(@"un9NxmSyvZ5bM7zrjtFcwU"); NSLog(@"SZEH45z7urCNkBojKvbJPWRL"); NSLog(@"tiL1k5y6PduIlqH3K2SJvmE"); NSLog(@"wGKRl3EuzI"); NSLog(@"IQlRc0YpswuL6fK9hjHGANM7t3bFqaCW1z5vBOng"); NSLog(@"JD1QjIzZ8eypluBV4Gc"); NSLog(@"jVQtMvAFUyKZdlku8fE"); NSLog(@"PWMVDjuIkC39KGZc0XFf"); NSLog(@"f82AcMtOXKomHsu5i0RJQqVwrZ"); NSLog(@"i4JGc2LFOSe6XQtzpvwMYrRkKA8xh0W"); NSLog(@"gJviOaKDALRU2XPuwT0Hmkjetl8S"); NSLog(@"puvfMw8CbhDOzHtUg4YXQsWRNx"); NSLog(@"5BeumZv8pQOG6ScfnHrN9xgwKDAVT0Y4b37Ia"); NSLog(@"ClIfp2JYxXntLK8"); } -(void)a4oNetQG:(UIMenuItem*) a4oNetQG a3gpl0:(UIBarButtonItem*) a3gpl0 aReLOgpa:(UIInputView*) aReLOgpa aLVwOr8:(UIEdgeInsets*) aLVwOr8 avpBUx1T:(UIViewController*) avpBUx1T ac6ARZre:(UIBarButtonItem*) ac6ARZre afLpgGrm:(UIBarButtonItem*) afLpgGrm awTSyV:(UIBarButtonItem*) awTSyV aBloJY:(UIButton*) aBloJY a9go81S:(UIBezierPath*) a9go81S au9JlFED:(UICollectionView*) au9JlFED aQESNPRc:(UIApplication*) aQESNPRc anWu6XEx3L:(UITableView*) anWu6XEx3L aQD5aL:(UIBezierPath*) aQD5aL aFUyipk:(UIImage*) aFUyipk actLMx:(UIEvent*) actLMx { NSLog(@"kIcmPYqtQMHrL"); NSLog(@"2gUFw80HdhMamAWy"); NSLog(@"IYn6ki927lhqv5TCXAmeZV"); NSLog(@"SPNylB1sOve8Ij5w"); NSLog(@"RQuLwTxBE3esDS0iWj5AfGnVFvZUtJzylm9dNg2"); NSLog(@"qa3UN9lVnKpQwDts4IZ5gihHymOfT6XukSL"); NSLog(@"VALOlQxk6RozNYhSWgsX1PMpnwieB"); NSLog(@"vrB4OMkjVHhUEWzPFCNp7df3Y9uolQ2"); NSLog(@"bTK48WAdHBLj9"); NSLog(@"hBMEbl6f4a"); } -(void)asA3h:(UILabel*) asA3h aUWID:(UIColor*) aUWID aUlOwfMs9j:(UIBarButtonItem*) aUlOwfMs9j aksTqG:(UIBezierPath*) aksTqG adlohM:(UIBarButtonItem*) adlohM aY27Wct:(UICollectionView*) aY27Wct alTtexsGMR:(UIDocument*) alTtexsGMR aMWr4hoce:(UIFontWeight*) aMWr4hoce anUsclHX:(UIBarButtonItem*) anUsclHX az2bLqfXJ:(UIUserInterfaceIdiom*) az2bLqfXJ aQZ2v:(UICollectionView*) aQZ2v av6sAPC:(UIControlEvents*) av6sAPC aVIroalgZL0:(UIViewController*) aVIroalgZL0 a3NJLsjunwR:(UISearchBar*) a3NJLsjunwR a4ldj:(UICollectionView*) a4ldj a35mhqbL:(UIApplication*) a35mhqbL aBbGae:(UIFontWeight*) aBbGae a2I4a:(UIBarButtonItem*) a2I4a aENwaQr1bJP:(UILabel*) aENwaQr1bJP aeUWoxTEJ6B:(UISearchBar*) aeUWoxTEJ6B { NSLog(@"mKYP76btWA1oGnMQvu53w"); NSLog(@"kgoAqcb6JFM2I3SUGZiz0"); NSLog(@"6odbmusqe2kA1hOyPNJxIS"); NSLog(@"gpQ0Wbaitxe7RkBchrnMfLAZX9Iz"); NSLog(@"kaLV4ju1YsTPBUOQH"); NSLog(@"7pSb4lN02vEZaTwH3jDGsL5MmBxeXW1P8tiCAg"); NSLog(@"kEo3xCWTYMhym97pV1tS4L5cQ"); NSLog(@"PZLadMt15cTfrsY7i3RVwUg4jlX8SGb2xQqpW6"); NSLog(@"GTxg0ivLjeCls5ku19MIP2U7o8HzV6X"); NSLog(@"DGBTfsltwjq5HSzM3RAmON9evFQ2Z1db6JIr7Pi"); NSLog(@"b0fD4eyu9chMIlrsRT2dLFAG1WwNZ6mzPtHgBVS"); NSLog(@"RJTqeoVWwD9fxi7Y0H5vkNdu6QGAMIzy"); NSLog(@"ysW4pGkXr92HD5Ciwt6RFmfchqBIeu"); NSLog(@"ug0mLlXz6S2"); NSLog(@"pPCKF4Z07f2DbBlMTXwGm8Ex5QvOy"); NSLog(@"nUsTPIpaEXe6FC0r9mVGY5qlBhyLQ2"); NSLog(@"wFljrnXdtxvMibqzUkVEh32of7BNpyIs"); NSLog(@"ReChcHafUSqLPY6Z"); NSLog(@"EmQH6pLnGvbelYt0RrWFjV2gS4IfBZ3wUkyhJ"); NSLog(@"cjz7OoZgKV5BHmNdxq6Ir9CDhQEkauf2ysiwUTMl"); } -(void)agYZa5DR:(UISearchBar*) agYZa5DR aHFz4N0G:(UIImageView*) aHFz4N0G a8r9Ry:(UITableView*) a8r9Ry a7xfQb:(UIUserInterfaceIdiom*) a7xfQb aKHv7CoDn:(UIImage*) aKHv7CoDn aRi8zo5NcJ:(UIViewController*) aRi8zo5NcJ { NSLog(@"mrH4tJPOSTVyvGM2iCw7qAXlKU5FsNhpD8LEQ1"); NSLog(@"O9mB5Urq84TMZ6"); NSLog(@"V8RBKHktrG0fasT3z2x1MC"); NSLog(@"7I9W1zV3PtqU0cO"); NSLog(@"HKFPUNiq0jbkDazg"); NSLog(@"6RgLyjMwuvnlp2qS34UxeAD"); NSLog(@"Tm2BYDXNCkdjiOea4nPWvyI6QAV8ZzsbKGS"); NSLog(@"2IzY9fFkQrj"); NSLog(@"jxIgaCbTXmyuvZ7LE9PcWG"); NSLog(@"r8NAsOYKU2wJC6xnSyVdIPGkR"); NSLog(@"9ZQwx8ntSCz1ky7KNDE3jfhsubomM20vH"); NSLog(@"L0gboReZSU4Vx7PTY"); NSLog(@"XPkUGr0VHOcp8otyn9zRKhw741TfM"); } -(void)amjgkuXG:(UIControl*) amjgkuXG acM9DIA:(UIScreen*) acM9DIA a1Y8akXEWw:(UIScreen*) a1Y8akXEWw aDmLPs1h8kT:(UIFont*) aDmLPs1h8kT aWPNkYlQovL:(UIVisualEffectView*) aWPNkYlQovL aKeklbc:(UIColor*) aKeklbc aGkUlpDHT:(UIDocument*) aGkUlpDHT aQx61mc:(UITableView*) aQx61mc abFmiIE7WK:(UIBarButtonItem*) abFmiIE7WK aisYJn:(UIMenuItem*) aisYJn { NSLog(@"v7KmfiWk1shZFyrg8cN3zSeoE9PU2twdYqVbT"); NSLog(@"WicaldEsIYyVTqU3kmzMSP9p"); NSLog(@"eKRUznSi6CXYyHJ3TqhwjfsumWGNO8rPFB40Qdk"); NSLog(@"60zQ1xZAYoSHyqe7fBmd9kVpOichsJMTb"); NSLog(@"O1tmyfnx9gKvUSZ5HYJBP6FWNbQs"); NSLog(@"6DWw1cA8P3iXuElIeh"); NSLog(@"l9AfuBKZr2XT4gN0C"); NSLog(@"tY0jrpBOXx"); NSLog(@"Rk6axKb3PAl2YFImfyz"); NSLog(@"LPcK8ONp5BgXfuUwSFovyM6bCxWai"); NSLog(@"npN7TV0USscydRFq"); } -(void)aAMhDEBSG:(UIButton*) aAMhDEBSG afDGe7g230:(UIWindow*) afDGe7g230 adIcQelOB:(UIEdgeInsets*) adIcQelOB ahwfHARm:(UISwitch*) ahwfHARm aQYUbG:(UIImageView*) aQYUbG a3aR0uyG:(UISearchBar*) a3aR0uyG a1e73vHxkq:(UIEdgeInsets*) a1e73vHxkq aFUqX3brySQ:(UIImageView*) aFUqX3brySQ aaFxh:(UISearchBar*) aaFxh atDUL32ORCZ:(UICollectionView*) atDUL32ORCZ akMiExG0:(UIControlEvents*) akMiExG0 adWOGy:(UILabel*) adWOGy { NSLog(@"nVL7WsAljSM4eyCXtf2ETaKYuGUx3861cZ5kP"); NSLog(@"aZDr3StpVdPyhTxMEKFG0s5Qlf8ciRBAnJ6"); NSLog(@"CuH0ndPgQ73Mjc6yJ5Y4"); NSLog(@"KN5XAmi64wD0EpHP9VUJsM3"); NSLog(@"RZd5NWvAGrfboCEUgTMLPOB8"); NSLog(@"V3AsqXje4O"); NSLog(@"s2BmgR03zSTfj7ePOQLH"); NSLog(@"qRMdY6h87fA4x1jObEQate9B5gpHN23JXrD0WLk"); NSLog(@"pBZMLsYyxnN"); NSLog(@"I6kZQpaPtrdnGX0xM"); NSLog(@"rXYnO645sM89PbTKlwpitkEJzC31xgaef"); NSLog(@"85BgDZcFOpEne"); } -(void)aIpXxh:(UITableView*) aIpXxh aD2T6PYg:(UIFontWeight*) aD2T6PYg atSgQUYEeOC:(UIApplication*) atSgQUYEeOC aRsi16IS3yB:(UIBezierPath*) aRsi16IS3yB amsk1Wg:(UIMenuItem*) amsk1Wg aveqFE:(UIControl*) aveqFE aKQieqAcu4:(UIVisualEffectView*) aKQieqAcu4 aWoA9BqTUyn:(UIApplication*) aWoA9BqTUyn azkurG0D72:(UISwitch*) azkurG0D72 a6kPoHVJ7:(UISearchBar*) a6kPoHVJ7 ayHdGxmIuF:(UIColor*) ayHdGxmIuF aVE3rT9G:(UIViewController*) aVE3rT9G a38uRg5KS:(UIAlertView*) a38uRg5KS { NSLog(@"JsQqlGy7ftkvKrVznobUugRWYxCemS8aTM"); NSLog(@"wdcVAStzOIYl2rmixDbsgMneWpKRLZG0Uyj9Tq"); NSLog(@"jDAdMCwa36U5IWhQYE924vz8JKFOrx"); NSLog(@"HuPVgiX3s7St9EZ8aJp56DbnBr4Mz"); NSLog(@"rEK6iLN2TUO9jfvsZ"); NSLog(@"oP6ZJc0b3MG49v7EpsOqKglm"); NSLog(@"PJZ52GdD4Sk7jiCcNuzQ6VTWOAthnlwMxBa0s9f"); NSLog(@"Ez6aq15udr3y8ZA"); NSLog(@"KIW3RegrSDPyLatcYV21ZC7ulJbUnjXT"); NSLog(@"ipRvkJ9f8ye3NnCgDGuwTlcW2FAxqK6ILM"); NSLog(@"nAfid32Sl8OIVGUERzLB"); NSLog(@"lC5rIq3jwGFBmMoKQ8nNODELitVHZ7pyz4Jd"); NSLog(@"gQZCxTmpoykL7nXAlN8HwBUi1"); NSLog(@"jtONHcz8h3bgWe6LmsZx7"); NSLog(@"ypEIm9NW6OCoV0LcSrlusY7eRUhxqnPJ35baziB"); NSLog(@"iPmeA1dkTj8WyKX6I5zCHoErB"); NSLog(@"9H6JoAXKszE5ULRIVP723qiDjaw0pl"); } -(void)a5IWdysZG7n:(UIBarButtonItem*) a5IWdysZG7n acyYl7VxQf:(UIVisualEffectView*) acyYl7VxQf aWJY0G9Ey:(UISwitch*) aWJY0G9Ey a6ZSnhTILmG:(UIVisualEffectView*) a6ZSnhTILmG anNaCuOgqjt:(UIAlertView*) anNaCuOgqjt a4pwT0yE:(UIControlEvents*) a4pwT0yE alxQrGKR5:(UIWindow*) alxQrGKR5 acq3rNYD4:(UICollectionView*) acq3rNYD4 alduIBKkX:(UISwitch*) alduIBKkX ah0ZIMiqVNp:(UIDocument*) ah0ZIMiqVNp acTe1:(UIInputView*) acTe1 a3YKj1:(UIControlEvents*) a3YKj1 au4dfeXhs:(UIUserInterfaceIdiom*) au4dfeXhs aDjRHheBmr:(UISwitch*) aDjRHheBmr { NSLog(@"wDu2o3xs9NCrBUPLgHjf7mYy5F1Zh"); NSLog(@"SyF4QUiD25P9pGNMAnaf"); NSLog(@"BbJRK6fOjqmMCIuYVgQ9hetLwZlpxrUDzTFa1G"); NSLog(@"2bGmSPc0zv7MDf5"); NSLog(@"4eljLKWdcgJS9ZBm7rxvinEDaPV0tY"); NSLog(@"9G1xKqS7H2RhM5ekbpfOvgdPm3IXLwlBr8WnC"); NSLog(@"WmGHXC5DusfoZypIzch8Lb3Pxnrw1BUMR4E"); NSLog(@"epBTRs0X9daClFU"); NSLog(@"7WPDkF69AlCiBXK4rwoL"); NSLog(@"JpACXIZ872g5qj6T3vFGRual1WBU"); NSLog(@"iofFayrCush2MD6X4A3Ok8nTj1"); NSLog(@"EPtf5FcOTynLHeqJuZ9V"); NSLog(@"XlSg2HbLaKQZPiqCvorp0eIBO"); NSLog(@"X3CbLwlANqn92jFI"); NSLog(@"kGmE8HDNBWIYnJjpz0dLoOtaX35ZKVMi6F7"); NSLog(@"3hgfxV4sMLBE"); NSLog(@"jU1gryvhaISYBXQ39LDxeG5ZCNwMPbc"); NSLog(@"QxW3i52zdCHRck6Su9j"); } @end