Commit 836baaad6f75137b1a38f30ec1e818b1ec8ebeca
1 parent
7a421df2
no message
Showing
10 changed files
with
28 additions
and
27 deletions
CNLiveLoginModule/Classes/Controller/CNLiveLoginController.m
| @@ -48,8 +48,7 @@ | @@ -48,8 +48,7 @@ | ||
| 48 | 48 | ||
| 49 | [self.view addSubview:self.close]; | 49 | [self.view addSubview:self.close]; |
| 50 | 50 | ||
| 51 | - | ||
| 52 | - CNLiveLoginView *loginView = [[CNLiveLoginView alloc] initWithFrame:CGRectMake(SCREEN_WIDTH/8.0, NavigationContentTop+20, SCREEN_WIDTH*3/4.0, 400)]; | 51 | + CNLiveLoginView *loginView = [[CNLiveLoginView alloc] initWithFrame:CGRectMake(SCREEN_WIDTH/8.0, NavigationContentTop+20, SCREEN_WIDTH*3/4.0, 380)]; |
| 53 | loginView.delegate = self; | 52 | loginView.delegate = self; |
| 54 | [self.view addSubview:loginView]; | 53 | [self.view addSubview:loginView]; |
| 55 | self.loginView = loginView; | 54 | self.loginView = loginView; |
CNLiveLoginModule/Classes/ThreeLogin/CNLiveBindingTelView.h
| 1 | // | 1 | // |
| 2 | // CNLiveBindingTelView.h | 2 | // CNLiveBindingTelView.h |
| 3 | -// XWLoginModule_Example | 3 | +// CNLiveLoginModule |
| 4 | // | 4 | // |
| 5 | // Created by CNLive-zxw on 2019/9/6. | 5 | // Created by CNLive-zxw on 2019/9/6. |
| 6 | // Copyright © 2019 153993236@qq.com. All rights reserved. | 6 | // Copyright © 2019 153993236@qq.com. All rights reserved. |
CNLiveLoginModule/Classes/ThreeLogin/CNLiveBindingTelView.m
| 1 | // | 1 | // |
| 2 | // CNLiveBindingTelView.m | 2 | // CNLiveBindingTelView.m |
| 3 | -// XWLoginModule_Example | 3 | +// CNLiveLoginModule |
| 4 | // | 4 | // |
| 5 | // Created by CNLive-zxw on 2019/9/6. | 5 | // Created by CNLive-zxw on 2019/9/6. |
| 6 | // Copyright © 2019 153993236@qq.com. All rights reserved. | 6 | // Copyright © 2019 153993236@qq.com. All rights reserved. |
CNLiveLoginModule/Classes/ThreeLogin/CNLiveThreeLoginType.h
| 1 | // | 1 | // |
| 2 | // CNLiveThreeLoginType.h | 2 | // CNLiveThreeLoginType.h |
| 3 | -// XWLoginModule_Example | 3 | +// CNLiveLoginModule |
| 4 | // | 4 | // |
| 5 | // Created by CNLive-zxw on 2019/9/9. | 5 | // Created by CNLive-zxw on 2019/9/9. |
| 6 | // Copyright © 2019 153993236@qq.com. All rights reserved. | 6 | // Copyright © 2019 153993236@qq.com. All rights reserved. |
CNLiveLoginModule/Classes/ThreeLogin/CNLiveThreeLoginView.h
| 1 | // | 1 | // |
| 2 | // CNLiveThreeLoginView.h | 2 | // CNLiveThreeLoginView.h |
| 3 | -// XWLoginModule_Example | 3 | +// CNLiveLoginModule |
| 4 | // | 4 | // |
| 5 | // Created by CNLive-zxw on 2019/9/6. | 5 | // Created by CNLive-zxw on 2019/9/6. |
| 6 | // Copyright © 2019 153993236@qq.com. All rights reserved. | 6 | // Copyright © 2019 153993236@qq.com. All rights reserved. |
CNLiveLoginModule/Classes/ThreeLogin/CNLiveThreeLoginView.m
| 1 | // | 1 | // |
| 2 | // CNLiveThreeLoginView.m | 2 | // CNLiveThreeLoginView.m |
| 3 | -// XWLoginModule_Example | 3 | +// CNLiveLoginModule |
| 4 | // | 4 | // |
| 5 | // Created by CNLive-zxw on 2019/9/6. | 5 | // Created by CNLive-zxw on 2019/9/6. |
| 6 | // Copyright © 2019 153993236@qq.com. All rights reserved. | 6 | // Copyright © 2019 153993236@qq.com. All rights reserved. |
CNLiveLoginModule/Classes/View/CNLiveCompleteInfoView.m
| @@ -10,6 +10,9 @@ | @@ -10,6 +10,9 @@ | ||
| 10 | #import "CNLiveLoginTextField.h" | 10 | #import "CNLiveLoginTextField.h" |
| 11 | #import "YYKit.h" | 11 | #import "YYKit.h" |
| 12 | #import "QMUIKit.h" | 12 | #import "QMUIKit.h" |
| 13 | + | ||
| 14 | +#import "CNUserInfoManager.h" | ||
| 15 | + | ||
| 13 | //#import "UIView+Layout.h" | 16 | //#import "UIView+Layout.h" |
| 14 | //#import "UIImage+Bundle.h" | 17 | //#import "UIImage+Bundle.h" |
| 15 | //#import "XWColorHeader.h" | 18 | //#import "XWColorHeader.h" |
| @@ -60,9 +63,9 @@ static const NSInteger timeValue = 1.5; | @@ -60,9 +63,9 @@ static const NSInteger timeValue = 1.5; | ||
| 60 | 63 | ||
| 61 | CNLiveLoginTextField *nickname = [[CNLiveLoginTextField alloc] initWithFrame:CGRectMake(0, head.bottom+space, frame.size.width, rowHeight)]; | 64 | CNLiveLoginTextField *nickname = [[CNLiveLoginTextField alloc] initWithFrame:CGRectMake(0, head.bottom+space, frame.size.width, rowHeight)]; |
| 62 | nickname.keyboardType = UIKeyboardTypeNumberPad; | 65 | nickname.keyboardType = UIKeyboardTypeNumberPad; |
| 63 | -// if(User_Login&&[User_Tel isValidMobile]){ | ||
| 64 | -// nickname.text = [User_Tel stringByReplacingCharactersInRange:NSMakeRange(3, 4) withString:@"****"]; | ||
| 65 | -// } | 66 | + if(CNUserShareManager.isLogin&&CNUserShareModel.mobile.length >= 11){ |
| 67 | + nickname.text = [CNUserShareModel.mobile stringByReplacingCharactersInRange:NSMakeRange(3, 4) withString:@"****"]; | ||
| 68 | + } | ||
| 66 | 69 | ||
| 67 | nickname.placeholder = @"请输入昵称"; | 70 | nickname.placeholder = @"请输入昵称"; |
| 68 | nickname.textColor = [UIColor colorWithRed:51/255.0 green:51/255.0 blue:51/255.0 alpha:1.0]; | 71 | nickname.textColor = [UIColor colorWithRed:51/255.0 green:51/255.0 blue:51/255.0 alpha:1.0]; |
CNLiveLoginModule/Classes/View/CNLiveLoginCountryView.h
| @@ -10,7 +10,7 @@ | @@ -10,7 +10,7 @@ | ||
| 10 | 10 | ||
| 11 | NS_ASSUME_NONNULL_BEGIN | 11 | NS_ASSUME_NONNULL_BEGIN |
| 12 | @protocol CNLiveLoginCountryViewDelegate <NSObject> | 12 | @protocol CNLiveLoginCountryViewDelegate <NSObject> |
| 13 | -- (void)selectCountryName:(NSString *)countryName countryCode:(NSString *)countryCode; | 13 | +- (void)chooseCountryName:(NSString *)countryName countryCode:(NSString *)countryCode; |
| 14 | 14 | ||
| 15 | @end | 15 | @end |
| 16 | @interface CNLiveLoginCountryView : UIView | 16 | @interface CNLiveLoginCountryView : UIView |
CNLiveLoginModule/Classes/View/CNLiveLoginCountryView.m
| @@ -71,20 +71,20 @@ | @@ -71,20 +71,20 @@ | ||
| 71 | UIViewController *root = [UIApplication sharedApplication].delegate.window.rootViewController; | 71 | UIViewController *root = [UIApplication sharedApplication].delegate.window.rootViewController; |
| 72 | CNLiveChooseCountryController *vc = [[CNLiveChooseCountryController alloc] init]; | 72 | CNLiveChooseCountryController *vc = [[CNLiveChooseCountryController alloc] init]; |
| 73 | vc.delegate = self; | 73 | vc.delegate = self; |
| 74 | + vc.modalPresentationStyle = UIModalPresentationFullScreen; | ||
| 74 | [root presentViewController:vc animated:YES completion:nil]; | 75 | [root presentViewController:vc animated:YES completion:nil]; |
| 75 | - | ||
| 76 | } | 76 | } |
| 77 | 77 | ||
| 78 | -#pragma mark - XWSelectCountryViewDelegate | ||
| 79 | -- (void)chooseViewController:(CNLiveChooseCountryController *)controller countryName:(NSString *)name countryCode:(NSString *)code{ | ||
| 80 | - if(![_countryName isEqualToString:name]&&![_countryCode isEqualToString:code]){ | ||
| 81 | - _countryName = name; | ||
| 82 | - _countryCode = code; | ||
| 83 | - _name.text = name; | ||
| 84 | - [_code setTitle:[NSString stringWithFormat:@"+%@",code] forState:UIControlStateNormal]; | 78 | +#pragma mark - CNLiveSelectCountryViewDelegate |
| 79 | +- (void)chooseViewController:(CNLiveChooseCountryController *)controller countryName:(NSString *)countryName countryCode:(NSString *)countryCode{ | ||
| 80 | + if(![_countryName isEqualToString:countryName]&&![_countryCode isEqualToString:countryCode]){ | ||
| 81 | + _countryName = countryName; | ||
| 82 | + _countryCode = countryCode; | ||
| 83 | + _name.text = countryName; | ||
| 84 | + [_code setTitle:[NSString stringWithFormat:@"+%@",countryCode] forState:UIControlStateNormal]; | ||
| 85 | } | 85 | } |
| 86 | - if (self.delegate && [self.delegate respondsToSelector:@selector(selectCountryName:countryCode:)]) { | ||
| 87 | - [self.delegate selectCountryName:name countryCode:code]; | 86 | + if (self.delegate && [self.delegate respondsToSelector:@selector(chooseCountryName:countryCode:)]) { |
| 87 | + [self.delegate chooseCountryName:countryName countryCode:countryCode]; | ||
| 88 | } | 88 | } |
| 89 | } | 89 | } |
| 90 | 90 |
CNLiveLoginModule/Classes/View/CNLiveLoginView.m
| @@ -55,9 +55,9 @@ static const NSInteger timeValue = 1.5; | @@ -55,9 +55,9 @@ static const NSInteger timeValue = 1.5; | ||
| 55 | 55 | ||
| 56 | } | 56 | } |
| 57 | - (void)createSubviews:(CGRect)frame{ | 57 | - (void)createSubviews:(CGRect)frame{ |
| 58 | - UIImageView *logo = [[UIImageView alloc] initWithFrame:CGRectMake((frame.size.width-80)/2.0, 0, 80, 105)]; | ||
| 59 | - UIImage *image1 = [self xw_getImageName:@"login_logo" bundleName:@"CNLiveLoginModule" targetClass:[self class]]; | ||
| 60 | - logo.image = image1; | 58 | + UIImageView *logo = [[UIImageView alloc] initWithFrame:CGRectMake((frame.size.width-75)/2.0, 0, 75, 100)]; |
| 59 | + UIImage *image = [self xw_getImageName:@"login_logo" bundleName:@"CNLiveLoginModule" targetClass:[self class]]; | ||
| 60 | + logo.image = image; | ||
| 61 | [self addSubview:logo]; | 61 | [self addSubview:logo]; |
| 62 | self.logo = logo; | 62 | self.logo = logo; |
| 63 | 63 | ||
| @@ -222,8 +222,8 @@ static const NSInteger timeValue = 1.5; | @@ -222,8 +222,8 @@ static const NSInteger timeValue = 1.5; | ||
| 222 | } | 222 | } |
| 223 | */ | 223 | */ |
| 224 | 224 | ||
| 225 | -#pragma mark - XWLoginCountryViewDelegate | ||
| 226 | -- (void)selectCountryName:(NSString *)countryName countryCode:(NSString *)countryCode{ | 225 | +#pragma mark - CNLiveLoginCountryViewDelegate |
| 226 | +- (void)chooseCountryName:(NSString *)countryName countryCode:(NSString *)countryCode{ | ||
| 227 | [_account resignFirstResponder]; | 227 | [_account resignFirstResponder]; |
| 228 | [_code resignFirstResponder]; | 228 | [_code resignFirstResponder]; |
| 229 | 229 | ||
| @@ -337,7 +337,6 @@ static const NSInteger timeValue = 1.5; | @@ -337,7 +337,6 @@ static const NSInteger timeValue = 1.5; | ||
| 337 | 337 | ||
| 338 | #pragma mark - 连接IM | 338 | #pragma mark - 连接IM |
| 339 | - (void)connectionIM:(id)result{ | 339 | - (void)connectionIM:(id)result{ |
| 340 | - | ||
| 341 | NSMutableDictionary *resDic = [NSMutableDictionary dictionaryWithDictionary:result[@"data"]]; | 340 | NSMutableDictionary *resDic = [NSMutableDictionary dictionaryWithDictionary:result[@"data"]]; |
| 342 | NSString *deFaceUrl = [resDic objectForKey:@"faceUrl"]; | 341 | NSString *deFaceUrl = [resDic objectForKey:@"faceUrl"]; |
| 343 | NSString *faceUrl = @""; | 342 | NSString *faceUrl = @""; |