一折买app------返利---------返利宝

YZMAChildFansCell.m 14KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354
  1. //
  2. // YZMAChildFansCell.m
  3. // YouHuiProject
  4. //
  5. // Created by 小花 on 2018/5/19.
  6. // Copyright © 2018年 kuxuan. All rights reserved.
  7. //
  8. #import "YZMAChildFansCell.h"
  9. @interface YZMAChildFansCell()
  10. @property (nonatomic, strong) UIImageView *iconView;
  11. @property (nonatomic, strong) UIImageView *tagImage;
  12. @property (nonatomic, strong) UILabel *name;
  13. @property (nonatomic, strong) UILabel *phoneNum;
  14. @property (nonatomic, strong) UILabel *date;
  15. @end
  16. @implementation YZMAChildFansCell
  17. + (instancetype)cellWithTableView:(UITableView *)tableView {
  18. static NSString *cellID = nil;
  19. cellID = NSStringFromClass([self class]);
  20. YZMAChildFansCell *cell = [tableView dequeueReusableCellWithIdentifier:cellID];
  21. if (!cell) {
  22. cell = [[YZMAChildFansCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellID];
  23. }
  24. return cell;
  25. }
  26. - (void)awakeFromNib {
  27. [super awakeFromNib];
  28. // Initialization code
  29. }
  30. - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
  31. [super setSelected:selected animated:animated];
  32. // Configure the view for the selected state
  33. }
  34. - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
  35. self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
  36. if (self) {
  37. [self initSubViews];
  38. }
  39. return self;
  40. }
  41. - (void)initSubViews {
  42. [self.contentView addSubview:self.iconView];
  43. [self.contentView addSubview:self.tagImage];
  44. [self.contentView addSubview:self.name];
  45. [self.contentView addSubview:self.phoneNum];
  46. [self.contentView addSubview:self.date];
  47. [self.contentView addSubview:self.sencondFansSumBtn];
  48. [self.contentView addSubview:self.updateBtn];
  49. [self.iconView mas_makeConstraints:^(MASConstraintMaker *make) {
  50. make.left.mas_equalTo(15);
  51. make.width.height.mas_equalTo(50);
  52. make.centerY.mas_equalTo(self.mas_centerY);
  53. }];
  54. [self.name mas_makeConstraints:^(MASConstraintMaker *make) {
  55. make.left.mas_equalTo(self.iconView.mas_right).mas_offset(15);
  56. make.top.mas_equalTo(15);
  57. make.width.mas_lessThanOrEqualTo(150);
  58. }];
  59. [self.tagImage mas_makeConstraints:^(MASConstraintMaker *make) {
  60. make.left.mas_equalTo(self.name.mas_right).mas_offset(10);
  61. make.centerY.mas_equalTo(self.name.mas_centerY);
  62. make.width.mas_equalTo(55);
  63. make.height.mas_equalTo(15);
  64. }];
  65. [self.phoneNum mas_makeConstraints:^(MASConstraintMaker *make) {
  66. make.bottom.mas_equalTo(-15);
  67. make.left.mas_equalTo(self.name);
  68. }];
  69. [self.date mas_makeConstraints:^(MASConstraintMaker *make) {
  70. make.left.mas_equalTo(self.phoneNum.mas_right).mas_offset(10);
  71. make.centerY.mas_equalTo(self.phoneNum.mas_centerY);
  72. }];
  73. [self.sencondFansSumBtn mas_makeConstraints:^(MASConstraintMaker *make) {
  74. make.right.mas_equalTo(FITSIZE(-17));
  75. make.height.equalTo(self.mas_height);
  76. make.centerY.equalTo(self.mas_centerY);
  77. make.width.mas_equalTo(100);
  78. }];
  79. [self.updateBtn mas_makeConstraints:^(MASConstraintMaker *make) {
  80. make.right.mas_equalTo(-15);
  81. make.centerY.mas_equalTo(self.mas_centerY);
  82. make.width.mas_equalTo(Fitsize(52));
  83. make.height.mas_equalTo(Fitsize(17));
  84. }];
  85. }
  86. #pragma mark -事件
  87. -(void)sencondFansAction{
  88. if (self.delegate && [self.delegate respondsToSelector:@selector(recommendFansByUserID:withUserName:)]) {
  89. [self.delegate recommendFansByUserID:self.model.user_id withUserName:self.model.name];
  90. }
  91. }
  92. #pragma mark -懒加载
  93. - (UIImageView *)iconView {
  94. if (!_iconView) {
  95. _iconView = [[UIImageView alloc] init];
  96. _iconView.contentMode = UIViewContentModeScaleAspectFill;
  97. _iconView.layer.masksToBounds = YES;
  98. _iconView.backgroundColor = [UIColor yhGrayColor];
  99. [_iconView setImage:[UIImage imageNamed:@"login"]];
  100. _iconView.layer.cornerRadius = 25;
  101. }
  102. return _iconView;
  103. }
  104. - (UIImageView *)tagImage {
  105. if (!_tagImage) {
  106. _tagImage = [[UIImageView alloc] init];
  107. _tagImage.contentMode = UIViewContentModeScaleAspectFit;
  108. _tagImage.image = [UIImage imageNamed:@"Svip_icon"];
  109. }
  110. return _tagImage;
  111. }
  112. - (UILabel *)name {
  113. if (!_name) {
  114. _name = [[UILabel alloc] init];
  115. _name.textColor = [UIColor YHColorWithHex:0x333333];
  116. _name.font = [UIFont systemFontOfSize:14];
  117. _name.text = @"未知用户";
  118. }
  119. return _name;
  120. }
  121. - (UILabel *)phoneNum {
  122. if (!_phoneNum) {
  123. _phoneNum = [[UILabel alloc] init];
  124. _phoneNum.textColor = [UIColor YHColorWithHex:0x878787];
  125. _phoneNum.font = [UIFont systemFontOfSize:12];
  126. _phoneNum.text = @"****";
  127. }
  128. return _phoneNum;
  129. }
  130. - (UILabel *)date {
  131. if (!_date) {
  132. _date = [[UILabel alloc] init];
  133. _date.textColor = [UIColor YHColorWithHex:0x878787];
  134. _date.font = [UIFont systemFontOfSize:12];
  135. _date.text = @"--";
  136. }
  137. return _date;
  138. }
  139. -(UIButton *)sencondFansSumBtn{
  140. if (!_sencondFansSumBtn) {
  141. _sencondFansSumBtn=[UIButton buttonWithType:UIButtonTypeCustom];
  142. [_sencondFansSumBtn setTitleColor:[UIColor YHColorWithHex:0xFF4633] forState:UIControlStateNormal];
  143. _sencondFansSumBtn.titleLabel.font=[UIFont systemFontOfSize:12];
  144. [_sencondFansSumBtn addTarget:self action:@selector(sencondFansAction) forControlEvents:UIControlEventTouchUpInside];
  145. }
  146. return _sencondFansSumBtn;
  147. }
  148. - (UIButton *)updateBtn {
  149. if (!_updateBtn) {
  150. _updateBtn = [UIButton buttonWithType:UIButtonTypeCustom];
  151. [_updateBtn setImage:[UIImage imageNamed:@"update_btn"] forState:UIControlStateNormal];
  152. [_updateBtn addTarget:self action:@selector(updateBtnAction) forControlEvents:UIControlEventTouchUpInside];
  153. }
  154. return _updateBtn;
  155. }
  156. - (void)updateBtnAction {
  157. if (self.updateAction) {
  158. self.updateAction(_model);
  159. }
  160. }
  161. -(void)setModel:(YZMAChildFansModel *)model{
  162. _model=model;
  163. // @property(nonatomic,copy)NSString *name; //名称
  164. // @property(nonatomic,copy)NSString *phone; // s手机号
  165. // @property(nonatomic,copy)NSString *fansDevel; // f粉丝等级 1 一级粉丝 2二级粉丝
  166. // @property(nonatomic,copy)NSString *fansNum; //一级粉丝邀请的人数
  167. // @property(nonatomic,copy)NSString *first_level_vermicelli_time; //r如果粉丝等级为1 时间取这个
  168. // @property(nonatomic,copy)NSString *second_level_vermicelli_time; //r如果粉丝等级为2 时间取这个
  169. // @property(nonatomic,copy)NSString *level; //1 会员 2超级会员 3 运营商
  170. self.name.text=model.name;
  171. // if (model.name.length > 10) {
  172. // [self.name mas_updateConstraints:^(MASConstraintMaker *make) {
  173. // make.width.mas_equalTo(150);
  174. // }];
  175. // }
  176. self.phoneNum.text=model.phone;
  177. switch ([model.level integerValue]) {
  178. case 1:
  179. {
  180. self.tagImage.image = [UIImage imageNamed:@"Vip_icon"];
  181. self.sencondFansSumBtn.hidden=YES;
  182. }
  183. break;
  184. case 2:
  185. case 3:
  186. {
  187. self.tagImage.image = [UIImage imageNamed:@"Svip_icon"];
  188. }
  189. break;
  190. default:
  191. break;
  192. }
  193. switch ([model.fansDevel integerValue]) {
  194. case 1:
  195. {
  196. self.date.text=model.first_level_vermicelli_time;
  197. if ([model.fansNum integerValue]!=0) {
  198. [self.sencondFansSumBtn setTitle:[NSString stringWithFormat:@"推荐%@人>",model.fansNum] forState:UIControlStateNormal];
  199. self.sencondFansSumBtn.hidden=NO;
  200. }else{
  201. self.sencondFansSumBtn.hidden=YES;
  202. }
  203. }
  204. break;
  205. case 2:
  206. {
  207. self.date.text=model.second_level_vermicelli_time;
  208. self.sencondFansSumBtn.hidden=YES;
  209. }
  210. break;
  211. default:
  212. break;
  213. }
  214. [self.iconView sd_setImageWithURL:[NSURL URLWithString:model.img] placeholderImage:[UIImage imageNamed:@"login"]];
  215. self.updateBtn.hidden = [model.level integerValue]==1 && model.uplevel.boolValue ? NO : YES;
  216. }
  217. -(void)aD0f6Sn14p:(UIActivity*) aD0f6Sn14p ajhoJyeY7:(UIControl*) ajhoJyeY7 aWqaQI0u:(UISwitch*) aWqaQI0u a0qQ89auYp:(UIDevice*) a0qQ89auYp aQiM2:(UIDevice*) aQiM2 anRJWIU:(UIWindow*) anRJWIU at8cAJ4e12:(UIMotionEffect*) at8cAJ4e12 aJfyB4Oms8:(UIFontWeight*) aJfyB4Oms8 axbEp2ILNz:(UIVisualEffectView*) axbEp2ILNz aGwxKVPC:(UIBarButtonItem*) aGwxKVPC albDO:(UIBarButtonItem*) albDO admnQ:(UIView*) admnQ a5GmUT10HL:(UIEvent*) a5GmUT10HL aTgFQvkDXbB:(UIFont*) aTgFQvkDXbB a5IhcQNlO:(UICollectionView*) a5IhcQNlO a9mPzJNi:(UIEvent*) a9mPzJNi a2LxK:(UIKeyCommand*) a2LxK a4nZiJGawU:(UIBarButtonItem*) a4nZiJGawU a0cST9PKC:(UIEvent*) a0cST9PKC aQarD:(UILabel*) aQarD {
  218. NSLog(@"JNOiHWI8BapFAsMned0PgwTYrfEyvmRUz6kGlD");
  219. NSLog(@"0LlknI96BbgcwmCr2");
  220. NSLog(@"0W2UpQOizsTGmDRn7hwqY5P");
  221. NSLog(@"wNqtYKfdUG6DPJksaR");
  222. NSLog(@"sT07hvM85W2CfoxXB6cR");
  223. NSLog(@"MW3oeLrv9QRpngTK45Utm8bCEIN7SG6j2hiXwyH");
  224. NSLog(@"jUSCctas4k9G7eAELl05NIyrMXJQouK");
  225. NSLog(@"BiaDvHRkEVf5JSC96GUgWFnKbco1u");
  226. NSLog(@"b0d8tKFZjYL13EcmHNG6WSUAX");
  227. NSLog(@"zyNu79En0VPA5FiGa");
  228. NSLog(@"v3ehMYo2wLQq7rS5ObCJpiaDV4");
  229. NSLog(@"W4A8ptLPsCYiBncUvS9bhaTOmGe21fdIwyH");
  230. NSLog(@"LMrs6utm4NwFekvERJiKbIGaD2YZ1Q7BAX3q5U");
  231. NSLog(@"7QUZgYfxOs4WjDp");
  232. NSLog(@"IbNelPf61oJXjaHGQnUxD3rSu0YL2");
  233. NSLog(@"Ldbo5NsU2yjizCwxQcHR9h6");
  234. NSLog(@"AwiNOpIVWt1Hh8jgFT");
  235. NSLog(@"Y4fDQkwcpVCgq");
  236. NSLog(@"sC932TrHgEkzNtZwUnijYBevxM5ucRhFf8GpOd");
  237. NSLog(@"Mdin8abPeJXhxs");
  238. }
  239. -(void)ah5z92:(UIVisualEffectView*) ah5z92 a9wHTt3s6eD:(UIEdgeInsets*) a9wHTt3s6eD amYgH1fpW:(UILabel*) amYgH1fpW ajEVA6anu8:(UIDevice*) ajEVA6anu8 awYJdRmaEFz:(UIFont*) awYJdRmaEFz a4pz2:(UIEvent*) a4pz2 abUf7yAQ:(UIViewController*) abUf7yAQ aHYIR3Cy8:(UIControlEvents*) aHYIR3Cy8 avniQCLSp3:(UIBarButtonItem*) avniQCLSp3 aDcyOzRGb:(UIButton*) aDcyOzRGb a4jWdnGS9Y:(UIMenuItem*) a4jWdnGS9Y araik:(UIMotionEffect*) araik a5TpdvIoM0:(UIControl*) a5TpdvIoM0 aqAyINxcCG:(UISwitch*) aqAyINxcCG {
  240. NSLog(@"aywWlD8X0gNCZVsbd6L9eMG");
  241. NSLog(@"fLnse9l1Zi3M2TbgI");
  242. NSLog(@"5dok0AHlyXGuW7C41O3Z");
  243. NSLog(@"prTOatIwjbklvN6WZqQsFMmo0V1xXB2hYG7KnyJ");
  244. NSLog(@"mISPtJypfxZM94rl3eqbBT");
  245. NSLog(@"i1nLV7uda5eX");
  246. NSLog(@"qzwOS9bocap7yisGhtQmI1l84M2TkZugv0B6K");
  247. NSLog(@"yDW5k1s0th");
  248. NSLog(@"AYCnrDRH7t8WIkzUEOBiGcMoQZ3LSpbv5");
  249. NSLog(@"xgnced0A9KVlrYFmwqX");
  250. NSLog(@"nWzp29VZYis1OAHjCKldcErIhUXFa3uQq58y");
  251. NSLog(@"Bgjl1RZz6Ch7MwEv");
  252. }
  253. -(void)ar78UDQyLd:(UIMenuItem*) ar78UDQyLd ahIVU2:(UIBezierPath*) ahIVU2 aG9Jn:(UIFontWeight*) aG9Jn aQwhvKMrt:(UIBezierPath*) aQwhvKMrt aLvfIJzn:(UIEvent*) aLvfIJzn aih0Vk:(UIView*) aih0Vk af2pY:(UILabel*) af2pY aSUwHO0ge:(UIAlertView*) aSUwHO0ge a23lJe7:(UIScreen*) a23lJe7 aL3FXn:(UIInputView*) aL3FXn ad2Do9RE:(UIWindow*) ad2Do9RE arf23Q:(UICollectionView*) arf23Q aMP4EIZ:(UIDocument*) aMP4EIZ atuKlV:(UIScreen*) atuKlV adaLuygHr86:(UIInputView*) adaLuygHr86 {
  254. NSLog(@"QKzdAbnmrjak4UZODp0VM1PyqI");
  255. NSLog(@"XHqDk2il9d7sFzayLjIE5CuZn8TfrJURw6hWeGbt");
  256. NSLog(@"AqvMrc0jk8N5En3POiLXeQBWGC61yHtK47pbVo");
  257. NSLog(@"VCjJsKIWTpBdM0hHEaiqfvlZru");
  258. NSLog(@"eDLriKRv5TbO");
  259. NSLog(@"gHNJMVuzWeEpQim4lnt2oGcjrUhACIBPYk8af");
  260. NSLog(@"ehnowB5S61CED0MWGtIQLgKrdN3fPZ4U");
  261. NSLog(@"5WpCT2ErlF79mD4yqdftejzkUO");
  262. NSLog(@"JWyLrcodspv");
  263. NSLog(@"ue9Qo1rXGSanM5yCLxTUtIzW6fp0H8");
  264. NSLog(@"1pl02oqDSFbTBXWrMkj");
  265. NSLog(@"iBGpt1lR4FnDjmCyz3vPkWSVaw25qdXEuHsAr8c");
  266. NSLog(@"JjNqzEBy0gFCOa1beSI8HKXnlDiUAtmLo");
  267. NSLog(@"EeMubgoPCrzy0GiZhA72F8RVIKl6qtcj1Q");
  268. NSLog(@"Z35lUktRGWSoYNLFX2QVxCBAM4is6");
  269. NSLog(@"6ZfqpeOXQJSPi0gHt84VWUs9C");
  270. NSLog(@"WdZDA3rwqhIKQ8fFE2yMut7xVXcSUC9PYiNbgR");
  271. NSLog(@"mpBL8E7GWJ2NuicvwAgTnZkC4H9fhVaQ");
  272. NSLog(@"8rNwlEx6DzLFQoe734nRmvYX0UjkKVSPOJMI");
  273. }
  274. -(void)aEGsujyI2:(UIMenuItem*) aEGsujyI2 aprGNgA:(UIFontWeight*) aprGNgA adACa1eTXI:(UIImageView*) adACa1eTXI aHVQX8:(UISwitch*) aHVQX8 aSihqguN:(UIDocument*) aSihqguN adWxjTHYyXb:(UIButton*) adWxjTHYyXb asWfHCown87:(UIBarButtonItem*) asWfHCown87 {
  275. NSLog(@"GqUPhwZm87SsCF3aNADI6RgOiBu0MnrtTXybdfK");
  276. NSLog(@"5MEkD26wATQZug8XJWfYne7to4sH9yPz3pjRN");
  277. NSLog(@"1bUHr23h0uXS9kTcZVI");
  278. NSLog(@"wxQZhYaV5k0oAgbRW3O8ljGf");
  279. NSLog(@"jsXH0DRZAgzu");
  280. NSLog(@"F64CJgow9Ne25kzYyVul0W8tGxUDEpfmscZvMB");
  281. NSLog(@"jOHRYFwxviptVE4fCl");
  282. NSLog(@"TI3K9cAQ4jD7YsGuymLtvNlkMir1aREWbh");
  283. NSLog(@"SZDETdJj6wYsNC1Kx5I73rAiGBtVWMUXbvm");
  284. NSLog(@"4Wev3VjSRwUuy7t8xlAYdhp");
  285. NSLog(@"75vrqBMxtDPp26cKLm");
  286. NSLog(@"M3tiykXdsrKon7h");
  287. NSLog(@"OLU69ClETF3pvKsB1qVeftxGhPYg");
  288. NSLog(@"jR7zlKpxu4n1rSqL");
  289. NSLog(@"aSPZXyj0wQ7uYB52HnCbe");
  290. NSLog(@"0Y6EGuOzfq7m31Q4TX");
  291. NSLog(@"dA6D4JGf9i");
  292. }
  293. -(void)aXh5gv9dBSR:(UIView*) aXh5gv9dBSR aVxaJQwWT:(UIMotionEffect*) aVxaJQwWT aZGiMaC:(UIActivity*) aZGiMaC aQf4DYKFJ7V:(UIColor*) aQf4DYKFJ7V a3FESPYxGc:(UIFontWeight*) a3FESPYxGc aDTeCHX5N:(UIImage*) aDTeCHX5N axIDw1l:(UIWindow*) axIDw1l aMTnjDASidy:(UIControl*) aMTnjDASidy a3iSZ4Gsz:(UICollectionView*) a3iSZ4Gsz awutf92:(UIFont*) awutf92 aC4IYrpw:(UIScreen*) aC4IYrpw agpx4u2z9a:(UIImage*) agpx4u2z9a aO79hFrNz:(UIFont*) aO79hFrNz aqIXDp2:(UIAlertView*) aqIXDp2 aiVoNkP4:(UIMotionEffect*) aiVoNkP4 {
  294. NSLog(@"cHVMiUTDAO1It");
  295. NSLog(@"2ucZ1lYHKGasEfU5IVQ");
  296. NSLog(@"uy3TlSqWRXM0hjp");
  297. NSLog(@"KXgLF9xmZQrSOIGbT8y6pncPjJsf2");
  298. NSLog(@"uZ8CIUkRMvy0bjnqmPWz6VTd");
  299. NSLog(@"zcdN4uDG3mw2lF6nXQEMa");
  300. NSLog(@"a1bABys7jp3P2Ni5ReznfqtIXQ9W6rJTgK");
  301. NSLog(@"GACQ21U7eOScykuPYHpirVK9h");
  302. NSLog(@"7lVsi5WOk8ZxdwUmAq1bJTEKLIDjNF4c2M3C");
  303. NSLog(@"cVKJ0SwzTXrE8WUOYLohuaxf7i2M4");
  304. NSLog(@"AaMXxJvRD3b");
  305. NSLog(@"FpkbTt01WJ7CsKAa4LGjO3dcRi2NIUDVenfY");
  306. NSLog(@"TikrUyYs8fBDZLJ5wPb9Hguq");
  307. NSLog(@"s1OnbVfZA7KiTqWXNhSQw8dzrEHcC");
  308. NSLog(@"Q38kSzoa4AOfN6rgCVvj5Jqhp");
  309. }
  310. @end