Commit ec2b555326efc01588399bf9c2778d6803714007

Authored by iOS-Xiaowen
1 parent c819e156

no message

CNLiveBLoginModule/Classes/ThreeLogin/CNLiveBindingTelController.m
@@ -84,7 +84,7 @@ @@ -84,7 +84,7 @@
84 84
85 - (CNLiveBindingTelView *)bindingTelView { 85 - (CNLiveBindingTelView *)bindingTelView {
86 if (!_bindingTelView) { 86 if (!_bindingTelView) {
87 - _bindingTelView = [[CNLiveBindingTelView alloc] initWithFrame:CGRectMake(self.view.frame.size.width/8.0, NavigationContentTop, self.view.frame.size.width*3/4.0, 400) type:self.type]; 87 + _bindingTelView = [[CNLiveBindingTelView alloc] initWithFrame:CGRectMake(self.view.frame.size.width/8.0, NavigationContentTop, self.view.frame.size.width*3/4.0, 400) model:self.model];
88 } 88 }
89 return _bindingTelView; 89 return _bindingTelView;
90 } 90 }
CNLiveBLoginModule/Classes/ThreeLogin/CNLiveBindingTelView.h
@@ -7,12 +7,12 @@ @@ -7,12 +7,12 @@
7 // 7 //
8 8
9 #import <UIKit/UIKit.h> 9 #import <UIKit/UIKit.h>
10 -#import "CNLiveThreeLoginType.h" 10 +@class CNLiveThreeLoginModel;
11 11
12 NS_ASSUME_NONNULL_BEGIN 12 NS_ASSUME_NONNULL_BEGIN
13 13
14 @interface CNLiveBindingTelView : UIView 14 @interface CNLiveBindingTelView : UIView
15 -- (instancetype)initWithFrame:(CGRect)frame type:(CNLiveThreeLoginType)type; 15 +- (instancetype)initWithFrame:(CGRect)frame model:(CNLiveThreeLoginModel *)model;
16 16
17 @end 17 @end
18 18
CNLiveBLoginModule/Classes/ThreeLogin/CNLiveBindingTelView.m
@@ -21,6 +21,7 @@ @@ -21,6 +21,7 @@
21 #import "CNLiveLoginCountryView.h" 21 #import "CNLiveLoginCountryView.h"
22 #import "CNLiveLoginTextField.h" 22 #import "CNLiveLoginTextField.h"
23 #import "CNLiveCountDownButton.h" 23 #import "CNLiveCountDownButton.h"
  24 +#import "CNLiveThreeLoginModel.h"
24 #import "CNLiveLoginRequest.h" 25 #import "CNLiveLoginRequest.h"
25 26
26 @interface CNLiveBindingTelView()<UITextFieldDelegate,CNLiveCountDownButtonDataSource, CNLiveCountDownButtonDelegate> 27 @interface CNLiveBindingTelView()<UITextFieldDelegate,CNLiveCountDownButtonDataSource, CNLiveCountDownButtonDelegate>
@@ -33,7 +34,7 @@ @@ -33,7 +34,7 @@
33 @property (nonatomic, weak) CNLiveLoginTextField *code; 34 @property (nonatomic, weak) CNLiveLoginTextField *code;
34 @property (nonatomic, strong) CNLiveCountDownButton *countDown; 35 @property (nonatomic, strong) CNLiveCountDownButton *countDown;
35 @property (nonatomic, weak) UIButton *binding; 36 @property (nonatomic, weak) UIButton *binding;
36 -@property (nonatomic, assign) CNLiveThreeLoginType type; 37 +@property (nonatomic, strong) CNLiveThreeLoginModel *model;
37 38
38 @end 39 @end
39 40
@@ -43,13 +44,12 @@ static NSInteger const rowHeight = 40; @@ -43,13 +44,12 @@ static NSInteger const rowHeight = 40;
43 static NSInteger const space = 40; 44 static NSInteger const space = 40;
44 static const NSInteger timeValue = 1.5; 45 static const NSInteger timeValue = 1.5;
45 46
46 -- (instancetype)initWithFrame:(CGRect)frame type:(CNLiveThreeLoginType)type{  
47 - 47 +- (instancetype)initWithFrame:(CGRect)frame model:(CNLiveThreeLoginModel *)model {
48 self = [super initWithFrame:frame]; 48 self = [super initWithFrame:frame];
49 if (self) { 49 if (self) {
50 self.userInteractionEnabled = YES; 50 self.userInteractionEnabled = YES;
51 _countryCode = @"86"; 51 _countryCode = @"86";
52 - self.type = type; 52 + self.model = model;
53 [self createSubviews:frame]; 53 [self createSubviews:frame];
54 54
55 } 55 }
@@ -233,7 +233,6 @@ static const NSInteger timeValue = 1.5; @@ -233,7 +233,6 @@ static const NSInteger timeValue = 1.5;
233 [CNLiveUserSystemCenter verificationCodeType:VerificationCodeTypeShortcutLogin mobile:_account.text countryCode:@"86" success:^(id result) { 233 [CNLiveUserSystemCenter verificationCodeType:VerificationCodeTypeShortcutLogin mobile:_account.text countryCode:@"86" success:^(id result) {
234 [QMUITips hideAllToastInView:XWKeyWindow animated:YES]; 234 [QMUITips hideAllToastInView:XWKeyWindow animated:YES];
235 [QMUITips showWithText:@"验证码已发送"]; 235 [QMUITips showWithText:@"验证码已发送"];
236 -  
237 // button.backgroundColor = HexColor(0xdedede); 236 // button.backgroundColor = HexColor(0xdedede);
238 button.frame = CGRectMake(self.frame.size.width-110, self.account.bottom+space+10, 110, rowHeight-10); 237 button.frame = CGRectMake(self.frame.size.width-110, self.account.bottom+space+10, 110, rowHeight-10);
239 [button setImage:nil forState:UIControlStateNormal]; 238 [button setImage:nil forState:UIControlStateNormal];
@@ -301,16 +300,16 @@ static const NSInteger timeValue = 1.5; @@ -301,16 +300,16 @@ static const NSInteger timeValue = 1.5;
301 - (void)thirdPartyLoginBindingTel{ 300 - (void)thirdPartyLoginBindingTel{
302 NSDictionary *params = @{ 301 NSDictionary *params = @{
303 @"mobile":self.account.text, 302 @"mobile":self.account.text,
304 -// @"countryCode":self.model.countryCode?self.model.countryCode:@"",  
305 -// @"verificationCode":self.code.text,  
306 -// @"thirdPartyPlat":self.model.thirdPartyPlat?self.model.thirdPartyPlat:@"",  
307 -// @"thirdPartyId":self.model.thirdPartyId?self.model.thirdPartyId:@"",  
308 -// @"frmId":self.model.frmId?self.model.frmId:@"",  
309 -// @"clientPlat":@"i",  
310 -// @"nickName":self.model.nickName?self.model.nickName:@"",  
311 -// @"gender":self.model.gender?self.model.gender:@"",  
312 -// @"location":self.model.location?self.model.location:@"",  
313 -// @"faceUrl":self.model.faceUrl?self.model.faceUrl:@"" 303 + @"countryCode":self.model.countryCode?self.model.countryCode:@"",
  304 + @"verificationCode":self.code.text,
  305 + @"thirdPartyPlat":self.model.thirdPartyPlat?self.model.thirdPartyPlat:@"",
  306 + @"thirdPartyId":self.model.thirdPartyId?self.model.thirdPartyId:@"",
  307 + @"frmId":self.model.frmId?self.model.frmId:@"",
  308 + @"clientPlat":@"i",
  309 + @"nickName":self.model.nickName?self.model.nickName:@"",
  310 + @"gender":self.model.gender?self.model.gender:@"",
  311 + @"location":self.model.location?self.model.location:@"",
  312 + @"faceUrl":self.model.faceUrl?self.model.faceUrl:@""
314 }; 313 };
315 [CNLiveNetworking setAllowRequestDefaultArgument:YES]; 314 [CNLiveNetworking setAllowRequestDefaultArgument:YES];
316 [CNLiveNetworking setupShowDataResult:NO]; 315 [CNLiveNetworking setupShowDataResult:NO];