Commit f4bca655 authored by 朱璇's avatar 朱璇

bugfix @莹莹 【组件化IOS】1v1和派单连线接通后,用户侧挂断,先提示‘面诊结束’toast,需要再点击1次,才会出现挂断弹窗

parent 96a10fa7
<?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 @@
GMTTTUser *_user;//加入进来的医生模型
GMLinkPromptView *_linePrompView;
GMUserFillMessageView *_userMessagLabel; //用户信息
UIViewController *_presentAlert;
}
- (instancetype)initWithFrame:(CGRect)frame
......@@ -216,6 +217,7 @@
if ([[GMBaseTool getCurrentViewController] isKindOfClass:[UIAlertController class]]) {
[[GMBaseTool getCurrentViewController] dismissViewControllerAnimated:YES completion:nil];
[_presentAlert.view removeFromSuperview];
}
......@@ -240,15 +242,19 @@
- (void)closeRoom:(BOOL) status {
if (_TTManager.totalTime < 180) {
_presentAlert = [[UIViewController alloc]init];
[self addSubview:_presentAlert.view];
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"提示" message:@"本次视频面诊时间貌似有点短,确定不再聊会儿?" preferredStyle:UIAlertControllerStyleAlert];
[alert addAction:[UIAlertAction actionWithTitle:@"再聊一会" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
[_presentAlert.view removeFromSuperview];
}]];
UIAlertAction *sureAction = [UIAlertAction actionWithTitle:@"结束面诊" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
[_presentAlert.view removeFromSuperview];
[GMHudModule showWarning:@"通话结束"];
[self exitRoom:status];
}];
[alert addAction:sureAction];
[[GMBaseTool getCurrentViewController] presentViewController:alert animated:YES completion:NULL];
[_presentAlert presentViewController:alert animated:YES completion:NULL];
} else {
[GMHudModule showWarning:@"通话结束"];
[self exitRoom:status];
......
......@@ -26,6 +26,7 @@
GMTTTUser *doctorUser;//加入进来的医生模型
GMLinkPromptView *_linePrompView;
GMTelephoneAudioPlay *_audioPlay;
UIViewController *_presentAlert;
}
@property (nonatomic, strong) GMRtcManager *TTManager;
@property (nonatomic, strong)GMUserTelephoneFunctionView *functionView;
......@@ -271,7 +272,6 @@
[self phobosName:@"hangup" extent:nil];
if (_TTManager.telephoneStatus == TelephoneVideoStatus_video) {
//视频中
[GMHudModule showWarning:@"通话结束"];
[GMVideoPhobos video_monitoringWithActionStep:@"关闭通话页" consultId:_TTManager.consultationRecordId traceId:nil];
[self closeRoom:YES];
} else {
......@@ -317,17 +317,22 @@
- (void)closeRoom:(BOOL) status {
if (_TTManager.totalTime < 180) {
_presentAlert = [[UIViewController alloc] init];
[self addSubview:_presentAlert.view];
NSString *title = _TTManager.vidoeTelephoneModel.counsellorInfo.counsellorType == 2 ? @"面诊师":@"医生";
NSString *name = [NSString stringWithFormat:@"%@擅长很多项目,可以多咨询呦",title];
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"提示" message:name preferredStyle:UIAlertControllerStyleAlert];
[alert addAction:[UIAlertAction actionWithTitle:@"再聊一会" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
[_presentAlert.view removeFromSuperview];
}]];
UIAlertAction *sureAction = [UIAlertAction actionWithTitle:@"结束面诊" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
[_presentAlert.view removeFromSuperview];
[GMHudModule showWarning:@"通话结束"];
[self exitRoom:status];
}];
[alert addAction:sureAction];
[[GMBaseTool getCurrentViewController] presentViewController:alert animated:YES completion:NULL];
[_presentAlert presentViewController:alert animated:YES completion:NULL];
// [[GMBaseTool getCurrentViewController] presentViewController:alert animated:YES completion:NULL];
} else {
[GMHudModule showWarning:@"通话结束"];
[self exitRoom:status];
......@@ -357,6 +362,7 @@
if ([[GMBaseTool getCurrentViewController] isKindOfClass:[UIAlertController class]]) {
[[GMBaseTool getCurrentViewController] dismissViewControllerAnimated:YES completion:nil];
[_presentAlert.view removeFromSuperview];
}
[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