Commit 51a215fd0a0363ebc080fe7ae82d4a7428a09356
1 parent
8d9549d3
no message
Showing
1 changed file
with
11 additions
and
5 deletions
CNLiveLoginModule/Classes/View/CNLiveCompleteInfoView.m
| @@ -171,7 +171,7 @@ static const NSInteger timeValue = 1.5; | @@ -171,7 +171,7 @@ static const NSInteger timeValue = 1.5; | ||
| 171 | __strong typeof(weakSelf) strongSelf = weakSelf; | 171 | __strong typeof(weakSelf) strongSelf = weakSelf; |
| 172 | if(!strongSelf) return ; | 172 | if(!strongSelf) return ; |
| 173 | strongSelf->_image = image; | 173 | strongSelf->_image = image; |
| 174 | - [strongSelf modifyIcon]; | 174 | + [strongSelf.head setImage:strongSelf->_image forState:UIControlStateNormal]; |
| 175 | dispatch_async(dispatch_get_main_queue(), ^{ | 175 | dispatch_async(dispatch_get_main_queue(), ^{ |
| 176 | [weakCameraController dismissViewControllerAnimated:YES completion:nil]; | 176 | [weakCameraController dismissViewControllerAnimated:YES completion:nil]; |
| 177 | }); | 177 | }); |
| @@ -197,7 +197,7 @@ static const NSInteger timeValue = 1.5; | @@ -197,7 +197,7 @@ static const NSInteger timeValue = 1.5; | ||
| 197 | __strong typeof(weakSelf) strongSelf = weakSelf; | 197 | __strong typeof(weakSelf) strongSelf = weakSelf; |
| 198 | if(!strongSelf) return ; | 198 | if(!strongSelf) return ; |
| 199 | strongSelf->_image = [photos firstObject]; | 199 | strongSelf->_image = [photos firstObject]; |
| 200 | - [strongSelf modifyIcon]; | 200 | + [strongSelf.head setImage:strongSelf->_image forState:UIControlStateNormal]; |
| 201 | }]; | 201 | }]; |
| 202 | [(UIViewController *)strongSelf.delegate presentViewController:picker animated:YES completion:nil]; | 202 | [(UIViewController *)strongSelf.delegate presentViewController:picker animated:YES completion:nil]; |
| 203 | }]; | 203 | }]; |
| @@ -243,7 +243,7 @@ static const NSInteger timeValue = 1.5; | @@ -243,7 +243,7 @@ static const NSInteger timeValue = 1.5; | ||
| 243 | } | 243 | } |
| 244 | self.next.userInteractionEnabled = NO; | 244 | self.next.userInteractionEnabled = NO; |
| 245 | [self.superview endEditing:YES]; | 245 | [self.superview endEditing:YES]; |
| 246 | - [self modifyNickName]; | 246 | + [self modifyIcon]; |
| 247 | } | 247 | } |
| 248 | 248 | ||
| 249 | // 修改头像 | 249 | // 修改头像 |
| @@ -260,8 +260,8 @@ static const NSInteger timeValue = 1.5; | @@ -260,8 +260,8 @@ static const NSInteger timeValue = 1.5; | ||
| 260 | faceUrl = deFaceUrl; | 260 | faceUrl = deFaceUrl; |
| 261 | } | 261 | } |
| 262 | CNUserShareModel.faceUrl = faceUrl; | 262 | CNUserShareModel.faceUrl = faceUrl; |
| 263 | - [self.head setImage:self->_image forState:UIControlStateNormal]; | ||
| 264 | - | 263 | + [self modifyNickName]; |
| 264 | + | ||
| 265 | } failure:^(NSDictionary *errorDic) { | 265 | } failure:^(NSDictionary *errorDic) { |
| 266 | [QMUITips hideAllToastInView:self.superview animated:YES]; | 266 | [QMUITips hideAllToastInView:self.superview animated:YES]; |
| 267 | [QMUITips showError:errorDic[@"errorMessage"] inView:self.superview hideAfterDelay:timeValue]; | 267 | [QMUITips showError:errorDic[@"errorMessage"] inView:self.superview hideAfterDelay:timeValue]; |
| @@ -297,11 +297,17 @@ static const NSInteger timeValue = 1.5; | @@ -297,11 +297,17 @@ static const NSInteger timeValue = 1.5; | ||
| 297 | 297 | ||
| 298 | // 连接IM | 298 | // 连接IM |
| 299 | - (void)connectionIM { | 299 | - (void)connectionIM { |
| 300 | + __weak typeof(self) weakSelf = self; | ||
| 300 | [[CNLiveLoginRequest manager] loginTIM:CNUserShareModel.uid success:^{ | 301 | [[CNLiveLoginRequest manager] loginTIM:CNUserShareModel.uid success:^{ |
| 302 | + __strong typeof(weakSelf) strongSelf = weakSelf; | ||
| 303 | + if(!strongSelf) return; | ||
| 301 | // 进入tabbar | 304 | // 进入tabbar |
| 302 | 305 | ||
| 303 | } failed:^(int code, NSString * _Nonnull msg) { | 306 | } failed:^(int code, NSString * _Nonnull msg) { |
| 307 | + __strong typeof(weakSelf) strongSelf = weakSelf; | ||
| 308 | + if(!strongSelf) return; | ||
| 304 | // 错误逻辑 | 309 | // 错误逻辑 |
| 310 | + [QMUITips showError:msg inView:strongSelf.superview hideAfterDelay:timeValue]; | ||
| 305 | 311 | ||
| 306 | }]; | 312 | }]; |
| 307 | 313 |