BGLoginView.m 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575
  1. //
  2. // BGLoginView.m
  3. // BuguLive
  4. //
  5. // Created by bugu on 2019/12/10.
  6. // Copyright © 2019 xfg. All rights reserved.
  7. //
  8. #import "BGLoginView.h"
  9. #import <QMUIKit/QMUIKit.h>
  10. @interface BGLoginView ()<UITextFieldDelegate,NLgDelegate>
  11. @property(nonatomic, strong) UIImageView *bgImageView;
  12. @property(nonatomic, strong) UIImageView *iconImageView;
  13. @property(nonatomic, strong) UIView *loginBgView;
  14. @property(nonatomic, strong) UILabel *countryTipLabel;
  15. @property(nonatomic, strong) UIView *countryView;
  16. @property(nonatomic, strong) UIImageView *countryBgImageView;
  17. @property(nonatomic, strong) UIImageView *countryImageView;
  18. @property(nonatomic, strong) UILabel *countryLabel;
  19. @property(nonatomic, strong) UILabel *phoneTipLabel;
  20. @property(nonatomic, strong) UIImageView *phoneBgImageView;
  21. @property(nonatomic, strong) UITextField *mobileTF;
  22. @property(nonatomic, strong) UILabel *phoneLabel;
  23. @property(nonatomic, strong) UILabel *codeTipLabel;
  24. @property(nonatomic, strong) UIImageView *codeBgImageView;
  25. @property(nonatomic, strong) UITextField *codeTF;
  26. @property(nonatomic, strong) UIButton *codeButton;
  27. @property(nonatomic, strong) UIButton *loginBtn;
  28. @property(nonatomic, strong) UIButton *infoBtn;
  29. //第三方登录
  30. @property(nonatomic, strong) UILabel *otherLoginL;
  31. @property(nonatomic, strong) ULGView *LView;
  32. @property(nonatomic, strong) UIButton *vistorBtn;
  33. @property(nonatomic, strong) UIButton *registerBtn;
  34. @property(nonatomic, strong) UIButton *forgetBtn;//忘记密码
  35. @end
  36. static NSString *const image_name_bg = @"log背景";
  37. static NSString *const image_name = @"";
  38. static NSString *const image_name_layer_country = @"log选中输入框";
  39. static NSString *const image_name_layer_phone = @"log手机号输入";
  40. static NSString *const image_name_layer_code = @"log输入验证码";
  41. static NSString *const image_name_phone = @"log手机号";
  42. static NSString *const image_name_code = @"log验证码";
  43. static NSString *const image_name_login = @"mg_button_global";
  44. @implementation BGLoginView
  45. - (instancetype)init
  46. {
  47. self = [super init];
  48. if (self) {
  49. [self initUI];
  50. }
  51. return self;
  52. }
  53. - (void)initUI{
  54. _bgImageView = ({
  55. UIImageView *imageView = [[UIImageView alloc] init];
  56. imageView.image = [UIImage imageNamed:image_name_bg];
  57. imageView;
  58. });
  59. [self addSubview:_bgImageView];
  60. _loginBgView = ({
  61. UIView * view = [[UIView alloc]init];
  62. view.layer.masksToBounds = YES;
  63. view.layer.cornerRadius = 5;
  64. view.backgroundColor = kWhiteColor;
  65. view;
  66. });
  67. [self addSubview:_loginBgView];
  68. _iconImageView = ({
  69. UIImageView *imageView = [[UIImageView alloc] init];
  70. imageView.image = kDefaultPreloadHeadImg;
  71. imageView.layer.masksToBounds = YES;
  72. imageView.layer.cornerRadius = 40;
  73. imageView;
  74. });
  75. _iconImageView.hidden = YES;
  76. [self addSubview:_iconImageView];
  77. _countryTipLabel= ({
  78. UILabel * label = [[UILabel alloc]init];
  79. label.textColor = [UIColor colorWithHexString:@"#333333"];
  80. label.font = [UIFont boldSystemFontOfSize:16];
  81. label.text = ASLocalizedString(@"国家和地区");
  82. label;
  83. });
  84. _countryBgImageView = ({
  85. UIImageView *imageView = [[UIImageView alloc] init];
  86. imageView.image = [UIImage imageNamed:image_name_layer_country];
  87. imageView;
  88. });
  89. _countryImageView = ({
  90. UIImageView *imageView = [[UIImageView alloc] init];
  91. imageView.image = [UIImage imageNamed:ASLocalizedString(@"中国")];
  92. imageView;
  93. });
  94. _countryLabel= ({
  95. UILabel * label = [[UILabel alloc]init];
  96. label.textColor = [UIColor colorWithHexString:@"#333333"];
  97. label.font = [UIFont systemFontOfSize:14];
  98. label.text = ASLocalizedString(@"中国");
  99. label;
  100. });
  101. [_loginBgView addSubview:_countryTipLabel];
  102. [_loginBgView addSubview:_countryBgImageView];
  103. [_countryBgImageView addSubview:_countryImageView];
  104. [_countryBgImageView addSubview:_countryLabel];
  105. _countryTipLabel.hidden = _countryBgImageView.hidden = YES;
  106. _phoneTipLabel= ({
  107. UILabel * label = [[UILabel alloc]init];
  108. label.textColor = [UIColor colorWithHexString:@"#333333"];
  109. label.font = [UIFont boldSystemFontOfSize:16];
  110. label.text = ASLocalizedString(@"手机号");
  111. label;
  112. });
  113. _phoneBgImageView = ({
  114. UIImageView *imageView = [[UIImageView alloc] init];
  115. imageView.image = [UIImage imageNamed:image_name_layer_phone];
  116. imageView;
  117. });
  118. _mobileTF = ({
  119. UITextField *TF = [[UITextField alloc] init];
  120. TF.placeholder = ASLocalizedString(@"请输入您的手机号");
  121. // @"+86";
  122. TF.keyboardType = UIKeyboardTypeNumberPad;
  123. TF.leftViewMode = UITextFieldViewModeAlways;
  124. TF.delegate = self;
  125. TF.font = [UIFont systemFontOfSize:15];;
  126. TF.leftView = ({
  127. UIView *view = [[UIView alloc]initWithFrame:CGRectMake(0, 0, 25, 30)];
  128. UIImageView *iv = [[UIImageView alloc] initWithImage:[UIImage imageNamed:image_name_phone]];
  129. iv.frame = CGRectMake(-5, 0, 30, 30);
  130. iv.contentMode = UIViewContentModeCenter;
  131. [view addSubview:iv];
  132. view;
  133. });
  134. [TF addTarget:self action:@selector(textFieldDidChange:) forControlEvents:UIControlEventEditingChanged];
  135. TF;
  136. });
  137. _phoneLabel= ({
  138. UILabel * label = [[UILabel alloc]init];
  139. label.textColor = [UIColor colorWithHexString:@"#999999"];
  140. label.font = [UIFont systemFontOfSize:14];
  141. label.text = ASLocalizedString(@"请输入您的手机号");
  142. label.textAlignment = NSTextAlignmentRight;
  143. label;
  144. });
  145. _phoneLabel.hidden = YES;
  146. _phoneBgImageView.userInteractionEnabled = YES;
  147. [_loginBgView addSubview:_phoneTipLabel];
  148. [_loginBgView addSubview:_phoneBgImageView];
  149. [_phoneBgImageView addSubview:_phoneLabel];
  150. [_phoneBgImageView addSubview:_mobileTF];
  151. _codeTipLabel= ({
  152. UILabel * label = [[UILabel alloc]init];
  153. label.textColor = [UIColor colorWithHexString:@"#333333"];
  154. label.font = [UIFont boldSystemFontOfSize:16];
  155. label.text = ASLocalizedString(@"密码");
  156. label;
  157. });
  158. _codeBgImageView = ({
  159. UIImageView *imageView = [[UIImageView alloc] init];
  160. imageView.image = [UIImage imageNamed:image_name_layer_phone];
  161. imageView;
  162. });
  163. _codeTF = ({
  164. UITextField *TF = [[UITextField alloc] init];
  165. TF.placeholder =ASLocalizedString(@"请输入密码");
  166. // TF.keyboardType = UIKeyboardTypeNumberPad;
  167. TF.leftViewMode = UITextFieldViewModeAlways;
  168. TF.delegate = self;
  169. TF.secureTextEntry = YES;
  170. TF.clearButtonMode = UITextFieldViewModeWhileEditing;
  171. TF.font = [UIFont systemFontOfSize:15];;
  172. TF.leftView = ({
  173. UIView *view = [[UIView alloc]initWithFrame:CGRectMake(0, 0, 25, 30)];
  174. UIImageView *iv = [[UIImageView alloc] initWithImage:[UIImage imageNamed:image_name_code]];
  175. iv.frame = CGRectMake(-5, 0, 30, 30);
  176. iv.contentMode = UIViewContentModeCenter;
  177. [view addSubview:iv];
  178. view;
  179. });
  180. TF;
  181. });
  182. _codeButton = ({
  183. UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
  184. [btn setTitle:ASLocalizedString(@"获取验证码") forState:UIControlStateNormal];
  185. [btn setTitleColor:[UIColor colorWithHexString:@"#999999"] forState:UIControlStateNormal];
  186. btn.titleLabel.font = [UIFont systemFontOfSize:14];
  187. [btn addTarget:self action:@selector(btnClick:) forControlEvents:UIControlEventTouchUpInside];
  188. btn.tag = 10;
  189. btn;
  190. });
  191. _codeBgImageView.userInteractionEnabled = YES;
  192. [_loginBgView addSubview:_codeTipLabel];
  193. [_loginBgView addSubview:_codeBgImageView];
  194. [_codeBgImageView addSubview:_codeTF];
  195. _codeButton.hidden = YES;
  196. [_codeBgImageView addSubview:_codeButton];
  197. _forgetBtn = ({
  198. UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
  199. [btn setTitle:ASLocalizedString(@"忘记密码") forState:UIControlStateNormal];
  200. [btn setTitleColor:[UIColor colorWithHexString:@"#656565"] forState:UIControlStateNormal];
  201. btn.titleLabel.font = [UIFont systemFontOfSize:15];
  202. [btn addTarget:self action:@selector(clickForgetPassword:) forControlEvents:UIControlEventTouchUpInside];
  203. btn;
  204. });
  205. [_loginBgView addSubview:self.forgetBtn];
  206. _loginBtn = ({
  207. UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
  208. [btn setBackgroundImage:[UIImage imageNamed:image_name_login] forState:UIControlStateNormal];
  209. [btn setTitle:ASLocalizedString(@"登录") forState:UIControlStateNormal];
  210. [btn setTitleColor:kWhiteColor forState:UIControlStateNormal];
  211. // [UIColor colorWithHexString:@"#CD49FF"] forState:UIControlStateNormal];
  212. btn.titleLabel.font = [UIFont systemFontOfSize:16];
  213. [btn addTarget:self action:@selector(btnClick:) forControlEvents:UIControlEventTouchUpInside];
  214. btn.tag = 11;
  215. btn;
  216. });
  217. [_loginBgView addSubview:_loginBtn];
  218. NSString *firstStr = ASLocalizedString(@"登录即代表你同意");
  219. NSString *secondStr = ASLocalizedString(@"《用户隐私政策》");
  220. NSMutableAttributedString *attributeString = [[NSMutableAttributedString alloc]initWithString:[NSString stringWithFormat:@"%@%@",firstStr,secondStr]];
  221. [attributeString addAttribute:NSForegroundColorAttributeName value:[UIColor colorWithHexString:@"#FFFFFF"] range:NSMakeRange(0, firstStr.length)];
  222. [attributeString addAttribute:NSForegroundColorAttributeName value:[UIColor colorWithHexString:@"#DE88FF"] range:NSMakeRange(firstStr.length, secondStr.length)];
  223. _infoBtn = ({
  224. UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
  225. [btn setAttributedTitle:attributeString forState:UIControlStateNormal];
  226. [btn setTitleColor:UIColor.whiteColor forState:UIControlStateNormal];
  227. btn.titleLabel.font = [UIFont systemFontOfSize:12];
  228. [btn addTarget:self action:@selector(btnClick:) forControlEvents:UIControlEventTouchUpInside];
  229. btn.tag = 13;
  230. btn;
  231. });
  232. [self addSubview:_infoBtn];
  233. _otherLoginL = ({
  234. UILabel * label = [[UILabel alloc]init];
  235. label.textColor = kWhiteColor;
  236. label.font = [UIFont boldSystemFontOfSize:15];
  237. label.text = ASLocalizedString(@"其他登录方式");
  238. label;
  239. });
  240. [self addSubview:_otherLoginL];
  241. _vistorBtn =({
  242. UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
  243. [btn setTitle:ASLocalizedString(@"游客身份登录") forState:UIControlStateNormal];
  244. [btn setTitleColor:[UIColor colorWithHexString:@"#656565"] forState:UIControlStateNormal];
  245. btn.titleLabel.font = [UIFont systemFontOfSize:15];
  246. [btn addTarget:self action:@selector(clickVistor:) forControlEvents:UIControlEventTouchUpInside];
  247. btn;
  248. });
  249. _vistorBtn.hidden = YES;
  250. [_loginBgView addSubview:_vistorBtn];
  251. _registerBtn =({
  252. UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
  253. [btn setTitle:ASLocalizedString(@"注册") forState:UIControlStateNormal];
  254. [btn setTitleColor:kAppNewMainColor forState:UIControlStateNormal];
  255. btn.titleLabel.font = [UIFont systemFontOfSize:15];
  256. [btn addTarget:self action:@selector(clickRegister:) forControlEvents:UIControlEventTouchUpInside];
  257. btn.contentHorizontalAlignment = UIControlContentHorizontalAlignmentRight;
  258. btn;
  259. });
  260. [_loginBgView addSubview:_registerBtn];
  261. [self loginWay];
  262. self.codeBtn = self.codeButton;
  263. self.phoneText = self.mobileTF;
  264. self.codeText = self.codeTF;
  265. }
  266. //iOS 13以上
  267. -(void)textFieldDidChangeSelection:(UITextField *)textField{
  268. if (textField == self.mobileTF) {
  269. if (textField.text.length > 11) {
  270. [FanweMessage alertHUD:ASLocalizedString(@"手机号限制11位数!")];
  271. self.mobileTF.text = [self.mobileTF.text substringToIndex:11];
  272. }
  273. }
  274. }
  275. //iOS 13以下
  276. - (void)textFieldDidChange:(UITextField *)textField{
  277. if (textField == self.mobileTF) {
  278. if (textField.text.length > 11) {
  279. [FanweMessage alertHUD:ASLocalizedString(@"手机号限制11位数!")];
  280. self.mobileTF.text = [self.mobileTF.text substringToIndex:11];
  281. }
  282. }
  283. }
  284. -(void)clickVistor:(UIButton *)sender{
  285. if (self.clickVistorBlock) {
  286. self.clickVistorBlock(YES);
  287. }
  288. }
  289. -(void)clickRegister:(UIButton *)sender{
  290. if (self.clickReigsterBlock) {
  291. self.clickReigsterBlock(YES);
  292. }
  293. }
  294. -(void)clickForgetPassword:(UIButton *)sender{
  295. if (self.clickForgetPWBlock) {
  296. self.clickForgetPWBlock(YES);
  297. }
  298. }
  299. - (void)layoutSubviews {
  300. [super layoutSubviews];
  301. [_bgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
  302. make.edges.mas_equalTo(0);
  303. }];
  304. [_infoBtn mas_makeConstraints:^(MASConstraintMaker *make) {
  305. if(IS_47INCH_SCREEN)
  306. {
  307. make.bottom.mas_equalTo(-kRealValue(5)-(IPHONE_X ? 34 : 0));
  308. }
  309. else
  310. {
  311. make.bottom.mas_equalTo(-kRealValue(52)-(IPHONE_X ? 34 : 0));
  312. }
  313. make.centerX.mas_equalTo(0);
  314. }];
  315. [_loginBgView mas_makeConstraints:^(MASConstraintMaker *make) {
  316. make.centerX.mas_equalTo(0);
  317. make.top.mas_equalTo(kRealValue(144));
  318. make.left.mas_equalTo(28);
  319. make.height.mas_equalTo(372);
  320. }];
  321. [_iconImageView mas_makeConstraints:^(MASConstraintMaker *make) {
  322. make.centerX.mas_equalTo(0);
  323. make.centerY.equalTo(_loginBgView.mas_top);
  324. make.width.height.mas_equalTo(80);
  325. }];
  326. [_countryTipLabel mas_makeConstraints:^(MASConstraintMaker *make) {
  327. make.left.mas_equalTo(21);
  328. make.top.mas_equalTo(31);
  329. }];
  330. [_countryBgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
  331. make.top.equalTo(_countryTipLabel.mas_bottom).offset(9);
  332. make.centerX.mas_equalTo(0);
  333. make.left.mas_equalTo(20);
  334. }];
  335. [_countryImageView mas_makeConstraints:^(MASConstraintMaker *make) {
  336. make.left.mas_equalTo(14);
  337. make.centerY.mas_equalTo(0);
  338. make.height.mas_equalTo(23);
  339. }];
  340. [_countryLabel mas_makeConstraints:^(MASConstraintMaker *make) {
  341. make.left.equalTo(_countryImageView.mas_right).offset(14);
  342. make.centerY.mas_equalTo(0);
  343. }];
  344. [_phoneTipLabel mas_makeConstraints:^(MASConstraintMaker *make) {
  345. make.top.mas_equalTo(25);
  346. // equalTo(_countryBgImageView.mas_bottom).offset(21);
  347. make.left.mas_equalTo(21);
  348. }];
  349. [_phoneBgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
  350. make.top.equalTo(_phoneTipLabel.mas_bottom).offset(9);
  351. make.centerX.mas_equalTo(0);
  352. make.left.mas_equalTo(20);
  353. }];
  354. [_phoneLabel mas_makeConstraints:^(MASConstraintMaker *make) {
  355. make.centerY.mas_equalTo(0);
  356. make.right.mas_equalTo(-10);
  357. }];
  358. [_mobileTF mas_makeConstraints:^(MASConstraintMaker *make) {
  359. make.left.mas_equalTo(kRealValue(14));
  360. make.centerY.mas_equalTo(0);
  361. make.height.mas_equalTo(kRealValue(40));
  362. make.right.mas_equalTo(-10);
  363. }];
  364. [_codeTipLabel mas_makeConstraints:^(MASConstraintMaker *make) {
  365. make.top.equalTo(_phoneBgImageView.mas_bottom).offset(21);
  366. make.left.mas_equalTo(21);
  367. }];
  368. [_codeBgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
  369. make.top.equalTo(_codeTipLabel.mas_bottom).offset(9);
  370. make.centerX.mas_equalTo(0);
  371. make.left.mas_equalTo(20);
  372. }];
  373. [_codeButton mas_makeConstraints:^(MASConstraintMaker *make) {
  374. make.centerY.mas_equalTo(0);
  375. make.right.mas_equalTo(-10);
  376. make.width.mas_equalTo(kRealValue(100));
  377. }];
  378. [_codeTF mas_makeConstraints:^(MASConstraintMaker *make) {
  379. make.left.mas_equalTo(kRealValue(14));
  380. make.centerY.mas_equalTo(0);
  381. make.right.mas_equalTo(0);
  382. // equalTo(_codeButton.mas_left).offset(-4);
  383. // make.width.mas_equalTo(kRealValue(180));
  384. make.height.mas_equalTo(kRealValue(40));
  385. }];
  386. [_loginBtn mas_makeConstraints:^(MASConstraintMaker *make) {
  387. make.top.equalTo(_forgetBtn.mas_bottom).offset(10);
  388. make.centerX.mas_equalTo(0);
  389. make.width.mas_equalTo(241);
  390. make.height.mas_equalTo(44);
  391. }];
  392. _loginBtn.layer.cornerRadius = 44 / 2;
  393. _loginBtn.layer.masksToBounds = YES;
  394. [_otherLoginL mas_makeConstraints:^(MASConstraintMaker *make) {
  395. make.centerX.mas_equalTo(self);
  396. make.top.mas_equalTo(_loginBgView.mas_bottom).offset(15);
  397. make.height.mas_equalTo(44);
  398. }];
  399. [self.LView mas_makeConstraints:^(MASConstraintMaker *make) {
  400. make.top.mas_equalTo(_otherLoginL.mas_bottom).offset(15);
  401. make.left.right.mas_equalTo(0);
  402. make.height.mas_equalTo(kRealValue(44));
  403. }];
  404. [_vistorBtn mas_makeConstraints:^(MASConstraintMaker *make) {
  405. make.left.mas_equalTo(0);
  406. make.top.mas_equalTo(_loginBtn.mas_bottom).offset(10);
  407. make.height.mas_equalTo(44);
  408. make.width.mas_equalTo(self.loginBgView.mas_width).multipliedBy(0.5);
  409. }];
  410. [_registerBtn mas_makeConstraints:^(MASConstraintMaker *make) {
  411. make.right.mas_equalTo(_forgetBtn.mas_right);
  412. make.top.mas_equalTo(_loginBtn.mas_bottom).offset(10);
  413. make.height.mas_equalTo(44);
  414. // make.right.mas_equalTo(0);
  415. make.width.mas_equalTo(self.loginBgView.mas_width).multipliedBy(0.4);
  416. }];
  417. [_forgetBtn mas_makeConstraints:^(MASConstraintMaker *make) {
  418. make.right.mas_equalTo(_codeBgImageView.mas_right);
  419. make.height.mas_equalTo(kRealValue(40));
  420. make.top.mas_equalTo(_codeBgImageView.mas_bottom).offset(10);
  421. }];
  422. }
  423. #pragma mark 登入方式 0qq 1微信 2微博 3手机
  424. - (void)loginWay
  425. {
  426. NSMutableArray *array = [NSMutableArray array];
  427. if ([GlobalVariables sharedInstance].appModel.has_qq_login == 1)//QQ
  428. {
  429. [array addObject:@"1"];
  430. }
  431. if ([GlobalVariables sharedInstance].appModel.has_wx_login == 1)//微信
  432. {
  433. [array addObject:@"2"];
  434. }
  435. if ([GlobalVariables sharedInstance].appModel.has_sina_login == 1)//微博
  436. {
  437. [array addObject:@"3"];
  438. }
  439. if ([GlobalVariables sharedInstance].appModel.has_visitors_login == 1) {//游客登录
  440. _vistorBtn.hidden = NO;
  441. }
  442. if ([GlobalVariables sharedInstance].appModel.open_mobile_code_login == 1) {//验证码登录
  443. [array addObject:@"4"];
  444. }
  445. [array addObject:@"5"];
  446. // [array addObject:@"6"];
  447. // //如果各种登入方式都没有就将手机的登入方式都显示出来
  448. // if (array.count < 1)
  449. // {
  450. // array = [[NSMutableArray alloc]initWithObjects:@"4", nil];
  451. // }
  452. self.LView = [[ULGView alloc]initWithFrame:CGRectMake(0, kScreenH*0.7, kScreenW, 47) Array:array];
  453. self.LView.LDelegate = self;
  454. [self addSubview:self.LView];
  455. }
  456. -(void)enterLoginWithCount:(int)count{
  457. if (self.clickLoginBlock) {
  458. self.clickLoginBlock(count + 1000);
  459. }
  460. }
  461. -(void)btnClick:(UIButton *)sender{
  462. if (self.clickLoginBlock) {
  463. self.clickLoginBlock(sender.tag - 10);
  464. }
  465. }
  466. @end