Commit ec2b555326efc01588399bf9c2778d6803714007
1 parent
c819e156
no message
Showing
3 changed files
with
17 additions
and
18 deletions
CNLiveBLoginModule/Classes/ThreeLogin/CNLiveBindingTelController.m
| ... | ... | @@ -84,7 +84,7 @@ |
| 84 | 84 | |
| 85 | 85 | - (CNLiveBindingTelView *)bindingTelView { |
| 86 | 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 | 89 | return _bindingTelView; |
| 90 | 90 | } | ... | ... |
CNLiveBLoginModule/Classes/ThreeLogin/CNLiveBindingTelView.h
| ... | ... | @@ -7,12 +7,12 @@ |
| 7 | 7 | // |
| 8 | 8 | |
| 9 | 9 | #import <UIKit/UIKit.h> |
| 10 | -#import "CNLiveThreeLoginType.h" | |
| 10 | +@class CNLiveThreeLoginModel; | |
| 11 | 11 | |
| 12 | 12 | NS_ASSUME_NONNULL_BEGIN |
| 13 | 13 | |
| 14 | 14 | @interface CNLiveBindingTelView : UIView |
| 15 | -- (instancetype)initWithFrame:(CGRect)frame type:(CNLiveThreeLoginType)type; | |
| 15 | +- (instancetype)initWithFrame:(CGRect)frame model:(CNLiveThreeLoginModel *)model; | |
| 16 | 16 | |
| 17 | 17 | @end |
| 18 | 18 | ... | ... |
CNLiveBLoginModule/Classes/ThreeLogin/CNLiveBindingTelView.m
| ... | ... | @@ -21,6 +21,7 @@ |
| 21 | 21 | #import "CNLiveLoginCountryView.h" |
| 22 | 22 | #import "CNLiveLoginTextField.h" |
| 23 | 23 | #import "CNLiveCountDownButton.h" |
| 24 | +#import "CNLiveThreeLoginModel.h" | |
| 24 | 25 | #import "CNLiveLoginRequest.h" |
| 25 | 26 | |
| 26 | 27 | @interface CNLiveBindingTelView()<UITextFieldDelegate,CNLiveCountDownButtonDataSource, CNLiveCountDownButtonDelegate> |
| ... | ... | @@ -33,7 +34,7 @@ |
| 33 | 34 | @property (nonatomic, weak) CNLiveLoginTextField *code; |
| 34 | 35 | @property (nonatomic, strong) CNLiveCountDownButton *countDown; |
| 35 | 36 | @property (nonatomic, weak) UIButton *binding; |
| 36 | -@property (nonatomic, assign) CNLiveThreeLoginType type; | |
| 37 | +@property (nonatomic, strong) CNLiveThreeLoginModel *model; | |
| 37 | 38 | |
| 38 | 39 | @end |
| 39 | 40 | |
| ... | ... | @@ -43,13 +44,12 @@ static NSInteger const rowHeight = 40; |
| 43 | 44 | static NSInteger const space = 40; |
| 44 | 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 | 48 | self = [super initWithFrame:frame]; |
| 49 | 49 | if (self) { |
| 50 | 50 | self.userInteractionEnabled = YES; |
| 51 | 51 | _countryCode = @"86"; |
| 52 | - self.type = type; | |
| 52 | + self.model = model; | |
| 53 | 53 | [self createSubviews:frame]; |
| 54 | 54 | |
| 55 | 55 | } |
| ... | ... | @@ -233,7 +233,6 @@ static const NSInteger timeValue = 1.5; |
| 233 | 233 | [CNLiveUserSystemCenter verificationCodeType:VerificationCodeTypeShortcutLogin mobile:_account.text countryCode:@"86" success:^(id result) { |
| 234 | 234 | [QMUITips hideAllToastInView:XWKeyWindow animated:YES]; |
| 235 | 235 | [QMUITips showWithText:@"验证码已发送"]; |
| 236 | - | |
| 237 | 236 | // button.backgroundColor = HexColor(0xdedede); |
| 238 | 237 | button.frame = CGRectMake(self.frame.size.width-110, self.account.bottom+space+10, 110, rowHeight-10); |
| 239 | 238 | [button setImage:nil forState:UIControlStateNormal]; |
| ... | ... | @@ -301,16 +300,16 @@ static const NSInteger timeValue = 1.5; |
| 301 | 300 | - (void)thirdPartyLoginBindingTel{ |
| 302 | 301 | NSDictionary *params = @{ |
| 303 | 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 | 314 | [CNLiveNetworking setAllowRequestDefaultArgument:YES]; |
| 316 | 315 | [CNLiveNetworking setupShowDataResult:NO]; | ... | ... |