Commit 746727fe624b3c142a6add4bc6b88d8d93b58e3c
1 parent
6241482f
no message
Showing
2 changed files
with
4 additions
and
3 deletions
CNLiveLoginModule/Classes/Controller/CNLiveLoginController.m
| @@ -94,6 +94,7 @@ | @@ -94,6 +94,7 @@ | ||
| 94 | - (void)loginSuccess:(CNLiveLoginView *)view isNewUser:(BOOL)isNewUser result:(id _Nonnull)result{ | 94 | - (void)loginSuccess:(CNLiveLoginView *)view isNewUser:(BOOL)isNewUser result:(id _Nonnull)result{ |
| 95 | if (isNewUser) { | 95 | if (isNewUser) { |
| 96 | // 新用户 -> 设置昵称和头像 | 96 | // 新用户 -> 设置昵称和头像 |
| 97 | +// [OpenInstallSDK reportRegister]; | ||
| 97 | CNLiveCompleteInfoController *vc = [[CNLiveCompleteInfoController alloc]init]; | 98 | CNLiveCompleteInfoController *vc = [[CNLiveCompleteInfoController alloc]init]; |
| 98 | vc.hidesBottomBarWhenPushed = YES; | 99 | vc.hidesBottomBarWhenPushed = YES; |
| 99 | [self.navigationController pushViewController:vc animated:YES]; | 100 | [self.navigationController pushViewController:vc animated:YES]; |
CNLiveLoginModule/Classes/Model/CNLiveLoginRequest.m
| @@ -63,13 +63,12 @@ static const NSInteger timeValue = 1.5; | @@ -63,13 +63,12 @@ static const NSInteger timeValue = 1.5; | ||
| 63 | return [CNLiveLoginRequest manager]; | 63 | return [CNLiveLoginRequest manager]; |
| 64 | } | 64 | } |
| 65 | 65 | ||
| 66 | -//获取token | 66 | +// 获取token |
| 67 | - (void)getTIMLoginToken:(NSString *)identifier success:(void (^)(NSString * token))success failed:(void (^)(int code, NSString * msg))failed{ | 67 | - (void)getTIMLoginToken:(NSString *)identifier success:(void (^)(NSString * token))success failed:(void (^)(int code, NSString * msg))failed{ |
| 68 | NSDictionary *params = @{@"appId":AppId, | 68 | NSDictionary *params = @{@"appId":AppId, |
| 69 | @"plat":@"i", | 69 | @"plat":@"i", |
| 70 | @"sdkAppId":SdkAppId, | 70 | @"sdkAppId":SdkAppId, |
| 71 | @"identifier":identifier}; | 71 | @"identifier":identifier}; |
| 72 | - | ||
| 73 | [CNLiveNetworking setupShowDataResult:NO]; | 72 | [CNLiveNetworking setupShowDataResult:NO]; |
| 74 | [CNLiveNetworking setAllowRequestDefaultArgument:YES]; | 73 | [CNLiveNetworking setAllowRequestDefaultArgument:YES]; |
| 75 | [CNLiveNetworking requestNetworkWithMethod:CNLiveRequestMethodPOST URLString:TIM_GetTokenUrl Param:params CacheType:CNLiveNetworkCacheTypeNetworkOnly CompletionBlock:^(NSURLSessionTask *requestTask, id responseObject, NSError *error) { | 74 | [CNLiveNetworking requestNetworkWithMethod:CNLiveRequestMethodPOST URLString:TIM_GetTokenUrl Param:params CacheType:CNLiveNetworkCacheTypeNetworkOnly CompletionBlock:^(NSURLSessionTask *requestTask, id responseObject, NSError *error) { |
| @@ -95,6 +94,7 @@ static const NSInteger timeValue = 1.5; | @@ -95,6 +94,7 @@ static const NSInteger timeValue = 1.5; | ||
| 95 | 94 | ||
| 96 | } | 95 | } |
| 97 | 96 | ||
| 97 | +// 登录IM | ||
| 98 | - (void)loginTIM:(NSString *)uid success:(void (^)(void))success failed:(void (^)(int code, NSString * msg))failed{ | 98 | - (void)loginTIM:(NSString *)uid success:(void (^)(void))success failed:(void (^)(int code, NSString * msg))failed{ |
| 99 | [QMUITips showLoading:@"正在连接服务器..." inView:XWKeyWindow]; | 99 | [QMUITips showLoading:@"正在连接服务器..." inView:XWKeyWindow]; |
| 100 | 100 | ||
| @@ -143,7 +143,7 @@ static const NSInteger timeValue = 1.5; | @@ -143,7 +143,7 @@ static const NSInteger timeValue = 1.5; | ||
| 143 | NSLog(@"login failed : %@", msg); | 143 | NSLog(@"login failed : %@", msg); |
| 144 | [QMUITips hideAllToastInView:XWKeyWindow animated:YES]; | 144 | [QMUITips hideAllToastInView:XWKeyWindow animated:YES]; |
| 145 | if (code == 6208) { | 145 | if (code == 6208) { |
| 146 | - //离线被踢下线重新登录 | 146 | + // 离线被踢下线重新登录 |
| 147 | [self resumeLogin]; | 147 | [self resumeLogin]; |
| 148 | } | 148 | } |
| 149 | else{ | 149 | else{ |