更新
This commit is contained in:
@@ -10,7 +10,7 @@ use think\facade\Db;
|
||||
*/
|
||||
class ChatController extends BaseApiController
|
||||
{
|
||||
public array $notNeedLogin = ['notifyOpen', 'logAvPermission'];
|
||||
public array $notNeedLogin = ['notifyOpen', 'notifyClose', 'logAvPermission'];
|
||||
|
||||
/**
|
||||
* 上报音视频权限拒绝日志
|
||||
@@ -55,4 +55,21 @@ class ChatController extends BaseApiController
|
||||
ChatNotifyLogic::addNotify($doctorId, $patientId ?: '0', $patientName);
|
||||
return $this->success('已通知');
|
||||
}
|
||||
|
||||
/**
|
||||
* 患者离开会话页时通知医生(管理后台轮询 + 可与 IM 信令配合)
|
||||
*/
|
||||
public function notifyClose()
|
||||
{
|
||||
$doctorId = (int) ($this->request->post('doctor_id') ?: $this->request->post('doctorId'));
|
||||
$patientId = trim((string) ($this->request->post('patient_id') ?: $this->request->post('patientId') ?: ''));
|
||||
$patientName = trim((string) ($this->request->post('patient_name') ?: $this->request->post('patientName') ?: '患者'));
|
||||
|
||||
if ($doctorId <= 0) {
|
||||
return $this->fail('医生ID无效');
|
||||
}
|
||||
|
||||
ChatNotifyLogic::addPatientLeftNotify($doctorId, $patientId ?: '0', $patientName);
|
||||
return $this->success('已通知');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user