Commit 0e15d112 authored by yueming lu's avatar yueming lu

Merge branch 'master' into lym/test

* master:
  delete unused code
  bugfix @莹莹 【组件化IOS】1v1和派单连线接通后,用户侧挂断,先提示‘面诊结束’toast,需要再点击1次,才会出现挂断弹窗
parents 086ebf40 4ec62e94
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
GMTTTUser *_user;//加入进来的医生模型 GMTTTUser *_user;//加入进来的医生模型
GMLinkPromptView *_linePrompView; GMLinkPromptView *_linePrompView;
GMUserFillMessageView *_userMessagLabel; //用户信息 GMUserFillMessageView *_userMessagLabel; //用户信息
UIViewController *_presentAlert;
} }
- (instancetype)initWithFrame:(CGRect)frame - (instancetype)initWithFrame:(CGRect)frame
...@@ -216,6 +217,7 @@ ...@@ -216,6 +217,7 @@
if ([[GMBaseTool getCurrentViewController] isKindOfClass:[UIAlertController class]]) { if ([[GMBaseTool getCurrentViewController] isKindOfClass:[UIAlertController class]]) {
[[GMBaseTool getCurrentViewController] dismissViewControllerAnimated:YES completion:nil]; [[GMBaseTool getCurrentViewController] dismissViewControllerAnimated:YES completion:nil];
[_presentAlert.view removeFromSuperview];
} }
...@@ -240,15 +242,19 @@ ...@@ -240,15 +242,19 @@
- (void)closeRoom:(BOOL) status { - (void)closeRoom:(BOOL) status {
if (_TTManager.totalTime < 180) { if (_TTManager.totalTime < 180) {
_presentAlert = [[UIViewController alloc]init];
[self addSubview:_presentAlert.view];
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"提示" message:@"本次视频面诊时间貌似有点短,确定不再聊会儿?" preferredStyle:UIAlertControllerStyleAlert]; UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"提示" message:@"本次视频面诊时间貌似有点短,确定不再聊会儿?" preferredStyle:UIAlertControllerStyleAlert];
[alert addAction:[UIAlertAction actionWithTitle:@"再聊一会" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) { [alert addAction:[UIAlertAction actionWithTitle:@"再聊一会" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
[_presentAlert.view removeFromSuperview];
}]]; }]];
UIAlertAction *sureAction = [UIAlertAction actionWithTitle:@"结束面诊" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) { UIAlertAction *sureAction = [UIAlertAction actionWithTitle:@"结束面诊" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
[_presentAlert.view removeFromSuperview];
[GMHudModule showWarning:@"通话结束"]; [GMHudModule showWarning:@"通话结束"];
[self exitRoom:status]; [self exitRoom:status];
}]; }];
[alert addAction:sureAction]; [alert addAction:sureAction];
[[GMBaseTool getCurrentViewController] presentViewController:alert animated:YES completion:NULL]; [_presentAlert presentViewController:alert animated:YES completion:NULL];
} else { } else {
[GMHudModule showWarning:@"通话结束"]; [GMHudModule showWarning:@"通话结束"];
[self exitRoom:status]; [self exitRoom:status];
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
GMTTTUser *doctorUser;//加入进来的医生模型 GMTTTUser *doctorUser;//加入进来的医生模型
GMLinkPromptView *_linePrompView; GMLinkPromptView *_linePrompView;
GMTelephoneAudioPlay *_audioPlay; GMTelephoneAudioPlay *_audioPlay;
UIViewController *_presentAlert;
} }
@property (nonatomic, strong) GMRtcManager *TTManager; @property (nonatomic, strong) GMRtcManager *TTManager;
@property (nonatomic, strong)GMUserTelephoneFunctionView *functionView; @property (nonatomic, strong)GMUserTelephoneFunctionView *functionView;
...@@ -271,7 +272,6 @@ ...@@ -271,7 +272,6 @@
[self phobosName:@"hangup" extent:nil]; [self phobosName:@"hangup" extent:nil];
if (_TTManager.telephoneStatus == TelephoneVideoStatus_video) { if (_TTManager.telephoneStatus == TelephoneVideoStatus_video) {
//视频中 //视频中
[GMHudModule showWarning:@"通话结束"];
[GMVideoPhobos video_monitoringWithActionStep:@"关闭通话页" consultId:_TTManager.consultationRecordId traceId:nil]; [GMVideoPhobos video_monitoringWithActionStep:@"关闭通话页" consultId:_TTManager.consultationRecordId traceId:nil];
[self closeRoom:YES]; [self closeRoom:YES];
} else { } else {
...@@ -317,17 +317,21 @@ ...@@ -317,17 +317,21 @@
- (void)closeRoom:(BOOL) status { - (void)closeRoom:(BOOL) status {
if (_TTManager.totalTime < 180) { if (_TTManager.totalTime < 180) {
_presentAlert = [[UIViewController alloc] init];
[self addSubview:_presentAlert.view];
NSString *title = _TTManager.vidoeTelephoneModel.counsellorInfo.counsellorType == 2 ? @"面诊师":@"医生"; NSString *title = _TTManager.vidoeTelephoneModel.counsellorInfo.counsellorType == 2 ? @"面诊师":@"医生";
NSString *name = [NSString stringWithFormat:@"%@擅长很多项目,可以多咨询呦",title]; NSString *name = [NSString stringWithFormat:@"%@擅长很多项目,可以多咨询呦",title];
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"提示" message:name preferredStyle:UIAlertControllerStyleAlert]; UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"提示" message:name preferredStyle:UIAlertControllerStyleAlert];
[alert addAction:[UIAlertAction actionWithTitle:@"再聊一会" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) { [alert addAction:[UIAlertAction actionWithTitle:@"再聊一会" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
[_presentAlert.view removeFromSuperview];
}]]; }]];
UIAlertAction *sureAction = [UIAlertAction actionWithTitle:@"结束面诊" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) { UIAlertAction *sureAction = [UIAlertAction actionWithTitle:@"结束面诊" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
[_presentAlert.view removeFromSuperview];
[GMHudModule showWarning:@"通话结束"]; [GMHudModule showWarning:@"通话结束"];
[self exitRoom:status]; [self exitRoom:status];
}]; }];
[alert addAction:sureAction]; [alert addAction:sureAction];
[[GMBaseTool getCurrentViewController] presentViewController:alert animated:YES completion:NULL]; [_presentAlert presentViewController:alert animated:YES completion:NULL];
} else { } else {
[GMHudModule showWarning:@"通话结束"]; [GMHudModule showWarning:@"通话结束"];
[self exitRoom:status]; [self exitRoom:status];
...@@ -357,6 +361,7 @@ ...@@ -357,6 +361,7 @@
if ([[GMBaseTool getCurrentViewController] isKindOfClass:[UIAlertController class]]) { if ([[GMBaseTool getCurrentViewController] isKindOfClass:[UIAlertController class]]) {
[[GMBaseTool getCurrentViewController] dismissViewControllerAnimated:YES completion:nil]; [[GMBaseTool getCurrentViewController] dismissViewControllerAnimated:YES completion:nil];
[_presentAlert.view removeFromSuperview];
} }
[UIView animateWithDuration:0.4 animations:^{ [UIView animateWithDuration:0.4 animations:^{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment