Commit 51a215fd0a0363ebc080fe7ae82d4a7428a09356

Authored by zhangxiaowen
1 parent 8d9549d3

no message

CNLiveLoginModule/Classes/View/CNLiveCompleteInfoView.m
... ... @@ -171,7 +171,7 @@ static const NSInteger timeValue = 1.5;
171 171 __strong typeof(weakSelf) strongSelf = weakSelf;
172 172 if(!strongSelf) return ;
173 173 strongSelf->_image = image;
174   - [strongSelf modifyIcon];
  174 + [strongSelf.head setImage:strongSelf->_image forState:UIControlStateNormal];
175 175 dispatch_async(dispatch_get_main_queue(), ^{
176 176 [weakCameraController dismissViewControllerAnimated:YES completion:nil];
177 177 });
... ... @@ -197,7 +197,7 @@ static const NSInteger timeValue = 1.5;
197 197 __strong typeof(weakSelf) strongSelf = weakSelf;
198 198 if(!strongSelf) return ;
199 199 strongSelf->_image = [photos firstObject];
200   - [strongSelf modifyIcon];
  200 + [strongSelf.head setImage:strongSelf->_image forState:UIControlStateNormal];
201 201 }];
202 202 [(UIViewController *)strongSelf.delegate presentViewController:picker animated:YES completion:nil];
203 203 }];
... ... @@ -243,7 +243,7 @@ static const NSInteger timeValue = 1.5;
243 243 }
244 244 self.next.userInteractionEnabled = NO;
245 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 260 faceUrl = deFaceUrl;
261 261 }
262 262 CNUserShareModel.faceUrl = faceUrl;
263   - [self.head setImage:self->_image forState:UIControlStateNormal];
264   -
  263 + [self modifyNickName];
  264 +
265 265 } failure:^(NSDictionary *errorDic) {
266 266 [QMUITips hideAllToastInView:self.superview animated:YES];
267 267 [QMUITips showError:errorDic[@"errorMessage"] inView:self.superview hideAfterDelay:timeValue];
... ... @@ -297,11 +297,17 @@ static const NSInteger timeValue = 1.5;
297 297  
298 298 // 连接IM
299 299 - (void)connectionIM {
  300 + __weak typeof(self) weakSelf = self;
300 301 [[CNLiveLoginRequest manager] loginTIM:CNUserShareModel.uid success:^{
  302 + __strong typeof(weakSelf) strongSelf = weakSelf;
  303 + if(!strongSelf) return;
301 304 // 进入tabbar
302 305  
303 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  
... ...